Set sign_in attributes on iChain login
Set last_sign_in_at and current_sign_in_at attributes when iChain login is enabled. #807
This commit is contained in:
parent
976616b47b
commit
55ab8a8e8f
1 changed files with 3 additions and 1 deletions
|
|
@ -74,7 +74,9 @@ class User < ActiveRecord::Base
|
||||||
raise UserDisabled if user && user.is_disabled
|
raise UserDisabled if user && user.is_disabled
|
||||||
|
|
||||||
if user
|
if user
|
||||||
user.update_attributes(email: attributes[:email])
|
user.update_attributes(email: attributes[:email],
|
||||||
|
last_sign_in_at: user.current_sign_in_at,
|
||||||
|
current_sign_in_at: Time.current)
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
user = create!(username: username, email: attributes[:email])
|
user = create!(username: username, email: attributes[:email])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue