mirror of
https://github.com/strapi/strapi.git
synced 2025-11-14 01:02:04 +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 },
|
where: { email: params.email },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!user) {
|
||||||
|
throw new ApplicationError('user.not.found');
|
||||||
|
}
|
||||||
|
|
||||||
if (user.confirmed) {
|
if (user.confirmed) {
|
||||||
throw new ApplicationError('already.confirmed');
|
throw new ApplicationError('already.confirmed');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user