Skip to content
Browse files

bugfix

  • Loading branch information...
1 parent 525f21d commit 0451d2ee2e145ab410599e4a0a9e4baba48846d2 @witek witek committed Nov 2, 2011
Showing with 2 additions and 3 deletions.
  1. +1 −1 src/main/java/scrum/server/admin/User.java
  2. +1 −2 src/main/java/scrum/server/admin/UserDao.java
View
2 src/main/java/scrum/server/admin/User.java
@@ -145,6 +145,7 @@ public boolean matchesPassword(String password) {
@Override
public void setPassword(String value) {
+ if (!isPasswordSaltSet()) setPasswordSalt(Str.generatePassword(32));
this.password = hashPassword(value);
fireModified("password=xxx");
}
@@ -165,7 +166,6 @@ public void createLoginToken() {
@Override
public void ensureIntegrity() {
super.ensureIntegrity();
- if (!isPasswordSaltSet()) setPasswordSalt(Str.generatePassword(32));
if (Str.isBlank(this.password)) setPassword(webApplication.getSystemConfig().getDefaultUserPassword());
if (!isPublicNameSet()) setPublicName(getName());
if (!isColorSet()) setColor(getDefaultColor());
View
3 src/main/java/scrum/server/admin/UserDao.java
@@ -80,8 +80,7 @@ public User postUserWithOpenId(String openId, String nickname, String fullname,
@Override
public User newEntityInstance() {
User user = super.newEntityInstance();
- String password = getDefaultPassword();
- user.setPassword(password);
+ user.setPassword(getDefaultPassword());
user.setRegistrationDateAndTime(DateAndTime.now());
return user;
}

0 comments on commit 0451d2e

Please sign in to comment.
Something went wrong with that request. Please try again.