@strapi/plugin-users-permissions 4.2.0-alpha.0 → 4.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-users-permissions",
3
- "version": "4.2.0-alpha.0",
3
+ "version": "4.2.0-alpha.1",
4
4
  "description": "Protect your API with a full-authentication process based on JWT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@purest/providers": "^1.0.2",
31
- "@strapi/helper-plugin": "4.2.0-alpha.0",
32
- "@strapi/utils": "4.2.0-alpha.0",
31
+ "@strapi/helper-plugin": "4.2.0-alpha.1",
32
+ "@strapi/utils": "4.2.0-alpha.1",
33
33
  "bcryptjs": "2.4.3",
34
34
  "grant-koa": "5.4.8",
35
35
  "jsonwebtoken": "^8.1.0",
@@ -61,5 +61,5 @@
61
61
  "required": true,
62
62
  "kind": "plugin"
63
63
  },
64
- "gitHead": "0e1f1ae08565a5f2427753582f37645a43c00cb2"
64
+ "gitHead": "3a3567a85026c7685bbd826eed690044f602d876"
65
65
  }
@@ -338,7 +338,7 @@ module.exports = {
338
338
  params.confirmed = true;
339
339
  }
340
340
 
341
- const user = await getService('user').add(params);
341
+ const user = await getService('user').add(params);
342
342
 
343
343
  const sanitizedUser = await sanitizeUser(user, ctx);
344
344
 
@@ -419,6 +419,13 @@ module.exports = {
419
419
  where: { email: params.email },
420
420
  });
421
421
 
422
+ if (!user) {
423
+ return ctx.send({
424
+ email: params.email,
425
+ sent: true
426
+ });
427
+ }
428
+
422
429
  if (user.confirmed) {
423
430
  throw new ApplicationError('already.confirmed');
424
431
  }