mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Handle user not found error in email confirmation
This commit is contained in:
parent
0dd74c685b
commit
a49141679c
@ -422,6 +422,10 @@ module.exports = {
|
||||
where: { email: params.email },
|
||||
});
|
||||
|
||||
if (!user) {
|
||||
throw new ApplicationError('user.not.found');
|
||||
}
|
||||
|
||||
if (user.confirmed) {
|
||||
throw new ApplicationError('already.confirmed');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user