Example #1
0
 /**
  * Retrieve the user object for the specified username.
  *
  * @param username
  * @return a user object or null
  */
 @Override
 public UserModel getUserModel(String username) {
   if (StringUtils.isEmpty(username)) {
     return null;
   }
   String usernameDecoded = StringUtils.decodeUsername(username);
   UserModel user = userService.getUserModel(usernameDecoded);
   return user;
 }
Example #2
0
 /**
  * Delete the user object with the specified username
  *
  * @param username
  * @return true if successful
  */
 @Override
 public boolean deleteUser(String username) {
   if (StringUtils.isEmpty(username)) {
     return false;
   }
   String usernameDecoded = StringUtils.decodeUsername(username);
   UserModel user = getUserModel(usernameDecoded);
   if (userService.deleteUser(usernameDecoded)) {
     callDeleteUserListeners(user);
     return true;
   }
   return false;
 }