Show More
@@ -828,12 +828,10 b' class User(Base, BaseModel):' | |||||
828 | Session().add(usr) |
|
828 | Session().add(usr) | |
829 | log.debug('updated user %s lastactivity', usr.username) |
|
829 | log.debug('updated user %s lastactivity', usr.username) | |
830 |
|
830 | |||
831 |
def update_password(self, new_password |
|
831 | def update_password(self, new_password): | |
832 |
from rhodecode.lib.auth import get_crypt_password |
|
832 | from rhodecode.lib.auth import get_crypt_password | |
833 |
|
833 | |||
834 | self.password = get_crypt_password(new_password) |
|
834 | self.password = get_crypt_password(new_password) | |
835 | if change_api_key: |
|
|||
836 | self.api_key = generate_auth_token(self.username) |
|
|||
837 | Session().add(self) |
|
835 | Session().add(self) | |
838 |
|
836 | |||
839 | @classmethod |
|
837 | @classmethod |
@@ -308,9 +308,6 b' class UserModel(BaseModel):' | |||||
308 | new_user.name = firstname |
|
308 | new_user.name = firstname | |
309 | new_user.lastname = lastname |
|
309 | new_user.lastname = lastname | |
310 |
|
310 | |||
311 | if not edit: |
|
|||
312 | new_user.api_key = generate_auth_token(username) |
|
|||
313 |
|
||||
314 | # set password only if creating an user or password is changed |
|
311 | # set password only if creating an user or password is changed | |
315 | if not edit or _password_change(new_user, password): |
|
312 | if not edit or _password_change(new_user, password): | |
316 | reason = 'new password' if edit else 'new user' |
|
313 | reason = 'new password' if edit else 'new user' |
General Comments 0
You need to be logged in to leave comments.
Login now