Changeset - b5b34d71b23b
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-06-19 22:28:44
marcin@python-works.com
fix crypt password on update my account
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/user.py
Show inline comments
 
@@ -247,6 +247,7 @@ class UserModel(BaseModel):
 
            raise
 

	
 
    def update(self, user_id, form_data):
 
        from rhodecode.lib.auth import get_crypt_password
 
        try:
 
            user = self.get(user_id, cache=False)
 
            if user.username == 'default':
 
@@ -256,7 +257,7 @@ class UserModel(BaseModel):
 

	
 
            for k, v in form_data.items():
 
                if k == 'new_password' and v != '':
 
                    user.password = v
 
                    user.password = get_crypt_password(v)
 
                    user.api_key = generate_api_key(user.username)
 
                else:
 
                    setattr(user, k, v)
0 comments (0 inline, 0 general)