diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /app/controllers/sessions_controller.rb | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r-- | app/controllers/sessions_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 6195d152f00..fe3b8d9b8b4 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -215,11 +215,11 @@ class SessionsController < Devise::SessionsController def find_user strong_memoize(:find_user) do if session[:otp_user_id] && user_params[:login] - User.by_id_and_login(session[:otp_user_id], user_params[:login]).first + User.by_login(user_params[:login]).find_by_id(session[:otp_user_id]) elsif session[:otp_user_id] User.find(session[:otp_user_id]) elsif user_params[:login] - User.by_login(user_params[:login]) + User.find_by_login(user_params[:login]) end end end |