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,6 +103,7 @@ class Users::SessionsController < Sessions::SessionsController
|
|||
resource = klass.find_for_database_authentication(email: params[:user][:email])
|
||||
|
||||
if resource.present?
|
||||
if resource.access_locked?
|
||||
if resource.valid_password?(params[:user][:password])
|
||||
resource.remember_me = remember_me
|
||||
sign_in resource
|
||||
|
@ -110,4 +111,5 @@ class Users::SessionsController < Sessions::SessionsController
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue