Commit 335b3ed1 authored by Jakub Jirutka's avatar Jakub Jirutka

fix condition in find_for_ldap_auth

parent ad265b96
...@@ -91,7 +91,7 @@ class User < ActiveRecord::Base ...@@ -91,7 +91,7 @@ class User < ActiveRecord::Base
provider = auth.provider provider = auth.provider
name = auth.info.name.force_encoding("utf-8") name = auth.info.name.force_encoding("utf-8")
email = auth.info.email.downcase unless auth.info.email.nil? 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) if @user = User.find_by_extern_uid_and_provider(uid, provider)
@user @user
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment