Skip to content
Snippets Groups Projects
Commit 335b3ed1 authored by Jakub Jirutka's avatar Jakub Jirutka
Browse files

fix condition in find_for_ldap_auth

parent ad265b96
No related branches found
No related tags found
1 merge request!1164Fixed identification of users with extern auth provider (LDAP)
Loading
Loading
@@ -91,7 +91,7 @@ class User < ActiveRecord::Base
provider = auth.provider
name = auth.info.name.force_encoding("utf-8")
email = auth.info.email.downcase unless auth.info.email.nil?
raise OmniAuth::Error, "LDAP accounts must provide an uid and email address" if uid.nil? and email.nil?
raise OmniAuth::Error, "LDAP accounts must provide an uid and email address" if uid.nil? or email.nil?
 
if @user = User.find_by_extern_uid_and_provider(uid, provider)
@user
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment