add check access_locked? when login
This commit is contained in:
parent
8d03a6747c
commit
0ed9c4cbd4
1 changed files with 6 additions and 4 deletions
|
@ -103,10 +103,12 @@ class Users::SessionsController < Sessions::SessionsController
|
||||||
resource = klass.find_for_database_authentication(email: params[:user][:email])
|
resource = klass.find_for_database_authentication(email: params[:user][:email])
|
||||||
|
|
||||||
if resource.present?
|
if resource.present?
|
||||||
if resource.valid_password?(params[:user][:password])
|
if resource.access_locked?
|
||||||
resource.remember_me = remember_me
|
if resource.valid_password?(params[:user][:password])
|
||||||
sign_in resource
|
resource.remember_me = remember_me
|
||||||
resource.force_sync_credentials
|
sign_in resource
|
||||||
|
resource.force_sync_credentials
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue