fix condition in find_for_ldap_auth

This commit is contained in:
Jakub Jirutka 2012-08-20 12:58:03 +02:00
parent ad265b9610
commit 335b3ed197

View file

@ -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