fix: force lowercase for email on local auth

This commit is contained in:
NGPixel
2020-09-09 19:59:46 -04:00
parent 5295e413be
commit aa96e97028
4 changed files with 16 additions and 2 deletions

View File

@@ -675,7 +675,7 @@ module.exports = class User extends Model {
if (dupUsr) {
throw new WIKI.Error.AuthAccountAlreadyExists()
}
usrData.email = email
usrData.email = _.toLower(email)
}
if (!_.isEmpty(name) && name !== usr.name) {
usrData.name = _.trim(name)