fix: cannot update user email from admin (#1197)

This commit is contained in:
NGPixel 2019-11-16 22:32:55 -05:00
parent 1c814638da
commit d356937660

View File

@ -550,7 +550,7 @@ module.exports = class User extends Model {
const dupUsr = await WIKI.models.users.query().select('id').where({
email,
providerKey: usr.providerKey
})
}).first()
if (dupUsr) {
throw new WIKI.Error.AuthAccountAlreadyExists()
}