Permalink
Browse files

Merge pull request #1586 from Bregor/ber_to_string

Auth: Net::BER::BerIdentifiedStrings to Strings
  • Loading branch information...
dzaporozhets committed Jan 16, 2013
2 parents c9e6818 + 93cb01e commit 369dbaf39687f079dec40df20f3be367ca6c3ac7
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/gitlab/auth.rb
View
@@ -20,8 +20,9 @@ def find_for_ldap_auth(auth, signed_in_resource = nil)
def create_from_omniauth(auth, ldap = false)
provider = auth.provider
uid = auth.info.uid || auth.uid
name = auth.info.name.force_encoding("utf-8")
email = auth.info.email.downcase unless auth.info.email.nil?
uid = uid.to_s.force_encoding("utf-8")
name = auth.info.name.to_s.force_encoding("utf-8")
email = auth.info.email.to_s.downcase unless auth.info.email.nil?
ldap_prefix = ldap ? '(LDAP) ' : ''
raise OmniAuth::Error, "#{ldap_prefix}#{provider} does not provide an email"\

0 comments on commit 369dbaf

Please sign in to comment.