* java.lang.String, java.lang.String)
*/
public IUser addUser(String userName, String password, String email) throws UserException, IOException {
if (checkUserExists(userName)) {
throw new UserException(UserException.ALREADY_EXISTS);
}
if (this.maxUsers > 0 && this.usersCount >= this.maxUsers) {
throw new UserException(UserException.MAX_USERS);
}
IPerson person = this.personManager.addPerson(userName, password, email);
if (person != null) {
IUser user = newUser(person, this.baseDirectory.newInstance(this.baseDirectory, userName));
// users.put(userName, user);
//File userDir = user.getUserDirectory();
//userDir.mkdir();
//File settingsDir = user.getSettingsDirectory();
// settingsDir.mkdir();
try {
user.createProject(IDavinciServerConstants.DEFAULT_PROJECT);
} catch (IOException e) {
throw new UserException(e);
}
this.usersCount++;
return user;
}