Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit b06f9c9d authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Fix update password for the new user

parent 4aa337ee
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,6 @@ public class DBUser extends BaseEntity {
@ColumnDescription(comment = "DomiSMP settings: locale for the user")
private String smpLocale;
@OneToMany(
mappedBy = "user",
cascade = CascadeType.ALL,
......
......@@ -266,6 +266,10 @@ public class UIUserService extends UIServiceBase<DBUser, UserRO> {
dbCredential.setExpireOn(adminUpdate ? null :
currentTime.plusDays(configurationService.getPasswordPolicyValidDays()));
// if the credentials are not managed by the session , e.g. new - the parsist it
if (dbCredential.getId()==null) {
credentialDao.persist(dbCredential);
}
return dbCredential.getUser();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment