if (!_password.equals(_password2))
return INPUT;
String credentials = _passwordEncoder.encodePassword(_password, _userName);
UserIndexKey key = new UserIndexKey(UserIndexTypes.USERNAME, _userName);
UserIndex userIndex = _userService.getOrCreateUserForIndexKey(key,
credentials, false);
if (userIndex == null)
return ERROR;
User user = userIndex.getUser();
_userService.enableAdminRoleForUser(user, false);
// This will flush any internal cache on the initial setup check
_initialSetupService.isInitialSetupRequired(true);