Force utf-8 encoding for ldap omniauth_info.name

This commit is contained in:
mmozuras 2012-04-24 10:42:30 +03:00
parent 01bb42ae02
commit 03cc55dba6

View file

@ -98,7 +98,7 @@ class User < ActiveRecord::Base
end
def self.find_for_ldap_auth(omniauth_info)
name = omniauth_info.name
name = omniauth_info.name.force_encoding("utf-8")
email = omniauth_info.email.downcase
if @user = User.find_by_email(email)