*/
public static Account createAccount(String accountName, int targetAccess, Account recruiter, BNLogin subject)
throws AccountDoesNotExistException {
Account rsSubjectAccount = Account.get(accountName);
if(rsSubjectAccount != null)
throw new AccountDoesNotExistException("That account already exists!");
try {
rsSubjectAccount = Account.create(accountName, Rank.get(0), recruiter);
} catch(Exception e) {}
if(rsSubjectAccount == null)
throw new AccountDoesNotExistException("Failed to create account [" + accountName + "] for an unknown reason");
subject.setAccount(rsSubjectAccount);
rsSubjectAccount.setRank(Rank.get(targetAccess));
try {
rsSubjectAccount.updateRow();
return rsSubjectAccount;
} catch(Exception e) {
throw new AccountDoesNotExistException(e.getMessage());
}
}