/**
   * Set a user avatar image for given user id
   *
   * @param userId
   * @param imgBytes
   * @return
   */
  public boolean setUserAvatar(Long userId, byte[] imgBytes) {
    boolean success = false;

    success = userManager.updateUserAvatar(userId, imgBytes);

    return success;
  }
  public byte[] getUserAvatar(String username) {
    byte[] image;

    image = userManager.getUserAvatar(username);

    if (image == null) {
      image = getDefaultUserAvatar();
    }

    return image;
  }
 /**
  * Get userid of an existing user
  *
  * @param username
  * @return userid
  */
 public Long getUserId(String username) {
   return userManager.getUserId(username);
 }
 /**
  * Register a new user for the application
  *
  * @param username
  * @param pwHash
  */
 public void registerUser(String username, String email, String pwHash) {
   userManager.createUser(username, email, pwHash);
 }