mirror of
https://github.com/strapi/strapi.git
synced 2025-12-18 18:53:46 +00:00
Removed user not found error
This commit is contained in:
parent
39db68bcbf
commit
ba73a398dd
@ -338,7 +338,7 @@ module.exports = {
|
|||||||
params.confirmed = true;
|
params.confirmed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = await getService('user').add(params);
|
const user = await getService('user').add(params);
|
||||||
|
|
||||||
const sanitizedUser = await sanitizeUser(user, ctx);
|
const sanitizedUser = await sanitizeUser(user, ctx);
|
||||||
|
|
||||||
@ -420,7 +420,10 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
throw new ApplicationError('user.not.found');
|
return ctx.send({
|
||||||
|
email: params.email,
|
||||||
|
sent: true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.confirmed) {
|
if (user.confirmed) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user