@tomei/sso 0.35.6 → 0.35.8

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/sso",
3
- "version": "0.35.6",
3
+ "version": "0.35.8",
4
4
  "description": "Tomei SSO Package",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -258,7 +258,7 @@ export class User extends UserBase {
258
258
  // set all the class properties
259
259
  if (userInfo) {
260
260
  this.UserId = userInfo.UserId;
261
- this.UserName = userInfo.FullName;
261
+ this.UserName = userInfo.UserName;
262
262
  this.FullName = userInfo.FullName;
263
263
  this.IDNo = userInfo.IDNo;
264
264
  this.IDType = userInfo.IDType;
@@ -1987,9 +1987,14 @@ export class User extends UserBase {
1987
1987
  }
1988
1988
 
1989
1989
  //Make sure email is unique, call LoginUser.CheckUserInfoDuplicated method
1990
- if (data.Email !== this.Email || data.UserName !== this.UserName) {
1990
+ if (data.Email !== this.Email) {
1991
+ await User.checkUserInfoDuplicated(dbTransaction, {
1992
+ UserName: data.UserName,
1993
+ });
1994
+ }
1995
+
1996
+ if (data.UserName !== this.UserName) {
1991
1997
  await User.checkUserInfoDuplicated(dbTransaction, {
1992
- Email: data.Email,
1993
1998
  UserName: data.UserName,
1994
1999
  });
1995
2000
  }