[Git][noosfero/noosfero][master] ldap: fix alternative authentication method

Victor Costa gitlab at mg.gitlab.com
Fri May 13 08:54:21 BRT 2016


Victor Costa pushed to branch master at Noosfero / noosfero


Commits:
5bed328d by Victor Costa at 2016-05-13T08:53:54-03:00
ldap: fix alternative authentication method

- - - - -


1 changed file:

- plugins/ldap/lib/ldap_plugin.rb


Changes:

=====================================
plugins/ldap/lib/ldap_plugin.rb
=====================================
--- a/plugins/ldap/lib/ldap_plugin.rb
+++ b/plugins/ldap/lib/ldap_plugin.rb
@@ -53,7 +53,7 @@ class LdapPlugin < Noosfero::Plugin
     return nil if attrs.nil?
 
     user_login = get_login(attrs, ldap.attr_login, login)
-    user = User.find_or_initialize_by_login(user_login)
+    user = User.find_or_initialize_by(login: user_login)
     return nil if !user.new_record? && !user.activated?
 
     user.login = user_login



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/5bed328d23e96389b12720488c76cfadf43be434
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160513/7f91ed4f/attachment.html>


More information about the Noosfero-dev mailing list