Finish account settings option.

This commit is contained in:
Paulo Gustavo Veiga
2012-06-20 13:28:45 -03:00
parent a845a87183
commit cfe78bdf7e
46 changed files with 387 additions and 1179 deletions

View File

@@ -62,7 +62,7 @@ public class UserServiceImpl
// Generate a random password ...
final String password = randomstring(8, 10);
user.setPassword(password);
changePassword(user);
updateUser(user);
// Send an email with the new temporal password ...
notificationService.resetPassword(user, password);
@@ -119,11 +119,16 @@ public class UserServiceImpl
// Send registration email.
if (emailConfirmEnabled) {
notificationService.sendRegistrationEmail(user);
} else {
// Send a welcome email ..
notificationService.newAccountCreated(user);
}
return user;
}
public void changePassword(@NotNull User user) {
notificationService.passwordChanged(user);
userManager.updateUser(user);
}