diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-25 16:19:55 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-25 16:19:55 +0000 |
commit | 19d4ddf2f2158c5210a0b10cdd9934cbf93885c2 (patch) | |
tree | b879a4ad473ec86a477df7d58216be66097b2a58 /app/models/user.rb | |
parent | 39c97279ca6fe8864d44f6892f8769f656cba487 (diff) | |
download | redmine-19d4ddf2f2158c5210a0b10cdd9934cbf93885c2.tar.gz redmine-19d4ddf2f2158c5210a0b10cdd9934cbf93885c2.zip |
Fix LDAP on the fly creation. The User object doesn't have a :dn attribute.
Fixes #4918 and adds a test for the behavior.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3485 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 8a69fda00..496ca2137 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -111,7 +111,8 @@ class User < Principal # user is not yet registered, try to authenticate with available sources attrs = AuthSource.authenticate(login, password) if attrs - user = new(*attrs) + attributes = *attrs + user = new(attributes.symbolize_keys.except(:dn)) user.login = login user.language = Setting.default_language if user.save |