##// END OF EJS Templates
fix crypt password on update my account
marcink -
r2488:b5b34d71 beta
parent child Browse files
Show More
@@ -247,6 +247,7 class UserModel(BaseModel):
247 raise
247 raise
248
248
249 def update(self, user_id, form_data):
249 def update(self, user_id, form_data):
250 from rhodecode.lib.auth import get_crypt_password
250 try:
251 try:
251 user = self.get(user_id, cache=False)
252 user = self.get(user_id, cache=False)
252 if user.username == 'default':
253 if user.username == 'default':
@@ -256,7 +257,7 class UserModel(BaseModel):
256
257
257 for k, v in form_data.items():
258 for k, v in form_data.items():
258 if k == 'new_password' and v != '':
259 if k == 'new_password' and v != '':
259 user.password = v
260 user.password = get_crypt_password(v)
260 user.api_key = generate_api_key(user.username)
261 user.api_key = generate_api_key(user.username)
261 else:
262 else:
262 setattr(user, k, v)
263 setattr(user, k, v)
General Comments 0
You need to be logged in to leave comments. Login now