public static UserImpl signup(Map<String,String[]> parameters,String ip,List<SignupError> errors){
  log.entering("GaeStore","signup");
  String email=getFirst(parameters,"email");
  String displayName=getFirst(parameters,"displayName");
  String photoUrl=getFirst(parameters,"photoUrl");
  String password=getFirst(parameters,"password");
  String confirm=getFirst(parameters,"confirm");
  if (Strings.isNullOrEmpty(email) || !EmailValidator.isValid(email)) {
    errors.add(SignupError.INVALID_EMAIL);
  }
  if (Strings.isNullOrEmpty(displayName)) {
    errors.add(SignupError.EMPTY_DISPLAY_NAME);
  }
  if (Strings.isNullOrEmpty(password)) {
    errors.add(SignupError.INVALID_PASSWORD);
  }
 else   if (!password.equals(confirm)) {
    errors.add(SignupError.CONFIRM_MISMATCH);
  }
 else   if (password.length() < 3) {
    errors.add(SignupError.INVALID_PASSWORD);
  }
  PersistenceManager pm=pmf.getPersistenceManager();
  try {
    UserRecord record=findUserByEmail(pm,email);
    if (record != null) {
      errors.add(SignupError.EMAIL_REGISTERED);
    }
 else     if (errors.isEmpty()) {
      log.fine("Create new legacy user for: " + email);
      record=new UserRecord();
      record.setEmail(email);
      record.setDisplayName(displayName);
      record.setPhotoUrl(photoUrl);
      record.setPassword(password);
      record.setTosAccepted(true);
      pm.makePersistent(record);
      UserImpl user=createUserByRecord(record);
      return user;
    }
  }
  finally {
    pm.close();
  }
  log.exiting("GaeStore","signup");
  return null;
}

public static UserImpl signup ( Map < String , String [ ] > parameters , String ip , List < SignupError > errors ) { log . entering ( "GaeStore" , "signup" ) ; String email = getFirst ( parameters , "email" ) ; String displayName = getFirst ( parameters , "displayName" ) ; String photoUrl = getFirst ( parameters , "photoUrl" ) ; String password = getFirst ( parameters , "password" ) ; String confirm = getFirst ( parameters , "confirm" ) ; if ( Strings . isNullOrEmpty ( email ) || ! EmailValidator . isValid ( email ) ) { errors . add ( SignupError . INVALID_EMAIL ) ; } if ( Strings . isNullOrEmpty ( displayName ) ) { errors . add ( SignupError . EMPTY_DISPLAY_NAME ) ; } if ( Strings . isNullOrEmpty ( password ) ) { errors . add ( SignupError . INVALID_PASSWORD ) ; } else if ( ! password . equals ( confirm ) ) { errors . add ( SignupError . CONFIRM_MISMATCH ) ; } else if ( password . length ( ) < 3 ) { errors . add ( SignupError . INVALID_PASSWORD ) ; } PersistenceManager pm = pmf . getPersistenceManager ( ) ; try { UserRecord record = findUserByEmail ( pm , email ) ; if ( record != null ) { errors . add ( SignupError . EMAIL_REGISTERED ) ; } else if ( errors . isEmpty ( ) ) { log . fine ( "Create new legacy user for: " + email ) ; record = new UserRecord ( ) ; record . setEmail ( email ) ; record . setDisplayName ( displayName ) ; record . setPhotoUrl ( photoUrl ) ; record . setPassword ( password ) ; record . setTosAccepted ( true ) ; pm . makePersistent ( record ) ; UserImpl user = createUserByRecord ( record ) ; return user ; } } finally { pm . close ( ) ; } log . exiting ( "GaeStore" , "signup" ) ; return null ; }
creates an new user by the input fields .
