Show More
@@ -327,8 +327,11 b' class LoginView(object):' | |||
|
327 | 327 | if self.request.GET and self.request.GET.get('key'): |
|
328 | 328 | try: |
|
329 | 329 | user = User.get_by_auth_token(self.request.GET.get('key')) |
|
330 | password_reset_url = self.request.route_url( | |
|
331 | 'reset_password_confirmation', | |
|
332 | _query={'key': user.api_key}) | |
|
330 | 333 | data = {'email': user.email} |
|
331 | UserModel().reset_password(data) | |
|
334 | UserModel().reset_password(data, password_reset_url) | |
|
332 | 335 | self.session.flash( |
|
333 | 336 | _('Your password reset was successful, ' |
|
334 | 337 | 'a new password has been sent to your email'), |
@@ -532,7 +532,7 b' class UserModel(BaseModel):' | |||
|
532 | 532 | |
|
533 | 533 | return True |
|
534 | 534 | |
|
535 | def reset_password(self, data): | |
|
535 | def reset_password(self, data, pwd_reset_url): | |
|
536 | 536 | from rhodecode.lib.celerylib import tasks, run_task |
|
537 | 537 | from rhodecode.model.notification import EmailNotificationModel |
|
538 | 538 | from rhodecode.lib import auth |
@@ -557,6 +557,7 b' class UserModel(BaseModel):' | |||
|
557 | 557 | |
|
558 | 558 | email_kwargs = { |
|
559 | 559 | 'new_password': new_passwd, |
|
560 | 'password_reset_url': pwd_reset_url, | |
|
560 | 561 | 'user': user, |
|
561 | 562 | 'email': user_email, |
|
562 | 563 | 'date': datetime.datetime.now() |
General Comments 0
You need to be logged in to leave comments.
Login now