@@ -102,7 +102,7 class MyController < ApplicationController | |||
|
102 | 102 | if @user.save |
|
103 | 103 | # Reset the session creation time to not log out this session on next |
|
104 | 104 | # request due to ApplicationController#force_logout_if_password_changed |
|
105 |
session[:ctime] = |
|
|
105 | session[:ctime] = User.current.passwd_changed_on.utc.to_i | |
|
106 | 106 | flash[:notice] = l(:notice_account_password_updated) |
|
107 | 107 | redirect_to my_account_path |
|
108 | 108 | end |
@@ -314,7 +314,7 class User < Principal | |||
|
314 | 314 | def salt_password(clear_password) |
|
315 | 315 | self.salt = User.generate_salt |
|
316 | 316 | self.hashed_password = User.hash_password("#{salt}#{User.hash_password clear_password}") |
|
317 | self.passwd_changed_on = Time.now | |
|
317 | self.passwd_changed_on = Time.now.change(:usec => 0) | |
|
318 | 318 | end |
|
319 | 319 | |
|
320 | 320 | # Does the backend storage allow this user to change their password? |
General Comments 0
You need to be logged in to leave comments.
Login now