fix: Guard lowercase email for delete user operation
This commit is contained in:
@@ -275,7 +275,10 @@ class User extends Base {
|
|||||||
async $beforeUpdate(opt: ModelOptions, queryContext: QueryContext) {
|
async $beforeUpdate(opt: ModelOptions, queryContext: QueryContext) {
|
||||||
await super.$beforeUpdate(opt, queryContext);
|
await super.$beforeUpdate(opt, queryContext);
|
||||||
|
|
||||||
this.email = this.email.toLowerCase();
|
if (this.email) {
|
||||||
|
this.email = this.email.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
await this.generateHash();
|
await this.generateHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user