* @throws RealmException if password reset fail.
*/
public boolean resetPassword(String username_) throws RealmException {
if (StringUtil.isEmpty(username_)) {
throw new RealmException("Missing username arg!");
}
Properties props = _realmService.getUserProfile(username_);
if (props == null) {
throw new RealmException(String.format("Cannot find user (%s)!", username_));
}
String email = props.getProperty(RealmConstants.EMAIL);
if (StringUtil.isEmpty(email)) {
throw new RealmException("User's email is not defined!");
}
String newPassword = Long.toString(System.currentTimeMillis());
if (!_realmService.resetPassword(username_, newPassword, null)) {
return false;