return result;
}
///////////////////////////////////////////////////////////////
// Get email address for the user
UserInfoResult userInfoResult = getUserInfo(username);
if ( userInfoResult.getError() != null ) {
result.setError(userInfoResult.getError());
return result;
}
final String email = userInfoResult.getProps().get("email");
if ( email == null ) {
result.setError("No email associated with username: " +username);
return result;
}
///////////////////////////////////////////////////////////////
// get new password
String newPassword = Util2.generatePassword();
///////////////////////////////////////////////////////////////
// update password in back-end
Map<String, String> values = userInfoResult.getProps();
values.put("id", userInfoResult.getProps().get("id"));
values.put("password", newPassword);
values.put("sessionid", "4444444444444");
CreateUpdateUserAccountResult updatePwResult = createUpdateUserAccount(values);
if ( updatePwResult.getError() != null ) {
result.setError(updatePwResult.getError());