Commit 3e145a1a authored by Ryan Lee's avatar Ryan Lee

fixing bugs

parent 2ee5c9ae
......@@ -5,6 +5,7 @@ class ZepheiraController < ApplicationController
def ldap
if request.post?
created = false
user = nil
login = params[:username]
auth_sources = AuthSource.find(:all)
auth_sources.each do |src|
......@@ -12,7 +13,7 @@ class ZepheiraController < ApplicationController
# Cheating. Private method.
attrs = src.__send__(:get_user_dn, login)
if attrs.length > 0
user = User.new(attrs.except([:dn, :login]))
user = User.new(attrs.except(:dn))
user.login = login
user.language = Setting.default_language
if user.save
......
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