From 015680e1878f0e7bdaa16896574bca109cd8862f Mon Sep 17 00:00:00 2001 From: Einar Felipe Lanfranco Date: Wed, 21 Sep 2016 16:43:22 -0300 Subject: [PATCH] For work also with \\ domains Anyway the line remote_username = remote_username.to_s.split('@')[0] is not included in distribution version 2.0.1 --- lib/single_auth/application_controller_patch.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/single_auth/application_controller_patch.rb b/lib/single_auth/application_controller_patch.rb index d7eaee4..e6fb077 100644 --- a/lib/single_auth/application_controller_patch.rb +++ b/lib/single_auth/application_controller_patch.rb @@ -43,7 +43,7 @@ def find_current_user_with_ldap_single_auth def try_login_by_remote_env(remote_username) - remote_username = remote_username.to_s.split('@')[0] + remote_username = remote_username.to_s.split('\\')[1].split("@")[0] user = User.active.find_by_login remote_username if user.nil? user = add_user_by_ldap_info(remote_username) @@ -109,4 +109,4 @@ def update_autologout_time end end -end \ No newline at end of file +end