From 4d54cfe8407dcdfb8bdf27961716d46478fe33f7 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 18 Sep 2009 09:04:16 -0400
Subject: [PATCH] - Fix setting user name in 'new_user_identity' plugin (#1486137)

---
 CHANGELOG                                       |    1 +
 plugins/new_user_identity/new_user_identity.php |    6 +-----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 13be2ce..36b6335 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 CHANGELOG RoundCube Webmail
 ===========================
 
+- Fix setting user name in 'new_user_identity' plugin (#1486137)
 - Fix incorrect count of new messages in folder list when using multiple IMAP clients (#1485995)
 - Fix all folders checking for new messages with disabled caching (#1486128)
 - Support skins in 'archive' and 'markasjunk' plugins
diff --git a/plugins/new_user_identity/new_user_identity.php b/plugins/new_user_identity/new_user_identity.php
index 7559569..78c9952 100644
--- a/plugins/new_user_identity/new_user_identity.php
+++ b/plugins/new_user_identity/new_user_identity.php
@@ -19,10 +19,6 @@
  *  // When automatically setting a new users's full name in their
  *  // new identity, match the user's login name against this field.
  *  $rcmail_config['new_user_identity_match'] = 'uid';
- *  
- *  // Use the value in this field to automatically set a new users's
- *  // full name in their new identity.
- *  $rcmail_config['new_user_identity_field'] = 'name';
  */
 class new_user_identity extends rcube_plugin
 {
@@ -40,7 +36,7 @@
             $ldap->prop['search_fields'] = array($match);
             $results = $ldap->search($match, $args['user'], TRUE);
             if (count($results->records) == 1) {
-                $args['user_name'] = $results->records[0][$rcmail->config->get('new_user_identity_field')];
+                $args['user_name'] = $results->records[0]['name'];
             }
         }
         return $args;

--
Gitblit v1.9.1