Change identification of users with extern auth provider (LDAP)

This commit is contained in:
Jakub Jirutka 2012-07-29 16:15:52 +02:00
parent 8b7e404b5b
commit fa5a53f5ed
4 changed files with 26 additions and 9 deletions

View file

@ -15,8 +15,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
def ldap
# We only find ourselves here if the authentication to LDAP was successful.
info = request.env["omniauth.auth"]["info"]
@user = User.find_for_ldap_auth(info)
@user = User.find_for_ldap_auth(request.env["omniauth.auth"], current_user)
if @user.persisted?
@user.remember_me = true
end