add check access_locked? when login

This commit is contained in:
pedong 2019-06-25 15:02:50 +02:00 committed by Pierre de La Morinerie
parent 8d03a6747c
commit 0ed9c4cbd4

View file

@ -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