コード例 #1
0
  /**
   * @param user
   * @return
   */
  public User registerNewUser(final User user) {

    boolean registered = isUserAlreadyRegistered(user);
    user.setPassword(pwdEncoder.encode(user.getPassword()));

    if (registered) {
      return null;
    }

    userProfileDAO.registerUser(user);

    User newUser = loginDAO.findByEmailId(user.getEmailId());

    return newUser;
  }
コード例 #2
0
 public User getUserDetails(long userId) {
   return userProfileDAO.getUserById(userId);
 }