Exemple #1
0
 /*
  * 신규 가입 사용자 생성
  */
 private static User createNewUser(User user) {
   RandomNumberGenerator rng = new SecureRandomNumberGenerator();
   user.passwordSalt = Arrays.toString(rng.nextBytes().getBytes());
   user.password = hashedPassword(user.password, user.passwordSalt);
   User.create(user);
   if (isUseSignUpConfirm()) {
     user.changeState(UserState.LOCKED);
   } else {
     user.changeState(UserState.ACTIVE);
   }
   Email.deleteOtherInvalidEmails(user.email);
   return user;
 }
Exemple #2
0
 /*
  * 신규 가입 사용자 생성
  */
 private static User createNewUser(User user) {
   RandomNumberGenerator rng = new SecureRandomNumberGenerator();
   user.passwordSalt = rng.nextBytes().getBytes().toString();
   user.password = hashedPassword(user.password, user.passwordSalt);
   user.avatarUrl = DEFAULT_AVATAR_URL;
   User.create(user);
   if (isUseSignUpConfirm()) {
     user.changeState(UserState.LOCKED);
   } else {
     user.changeState(UserState.ACTIVE);
   }
   return user;
 }