@Override
 public boolean isAliasInUse(String alias, String username) {
   UserProfile userProfile = getUserProfileByImId(alias);
   if (userProfile != null && !userProfile.getUserName().equals(username)) {
     return true;
   }
   return false;
 }
 @Override
 public String getUsernameByImId(String imId) {
   UserProfile userProfile = getUserProfileByImId(imId);
   if (userProfile != null) {
     return userProfile.getUserName();
   }
   return null;
 }
 @Override
 public void deleteUserProfile(UserProfile profile) {
   m_template.remove(profile);
   deleteAvatar(profile.getUserName());
 }