Changeset 4929 in subversion
- Timestamp:
- Jul 17, 2011 1:27:36 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/new_user_identity/new_user_identity.php
r4927 r4929 7 7 * This plugin requires that a working public_ldap directory be configured. 8 8 * 9 * @version 1.0 19 * @version 1.02 10 10 * @author Kris Steinhoff 11 11 * … … 20 20 * // new identity, match the user's login name against this field. 21 21 * $rcmail_config['new_user_identity_match'] = 'uid'; 22 * 23 * // Use this field (from fieldmap configuration) to fill alias col of 24 * // the new user record. 25 * $rcmail_config['new_user_identity_alias'] = 'alias'; 22 26 */ 23 27 class new_user_identity extends rcube_plugin … … 34 38 function lookup_user_name($args) 35 39 { 40 $rcmail = rcmail::get_instance(); 41 36 42 if ($this->init_ldap()) { 37 43 $results = $this->ldap->search('*', $args['user'], TRUE); … … 40 46 if (!$args['user_email'] && strpos($results->records[0]['email'], '@')) { 41 47 $args['user_email'] = rcube_idn_to_ascii($results->records[0]['email']); 48 } 49 if (($alias_col = $rcmail->config->get('new_user_identity_alias')) && $results->records[0][$alias_col]) { 50 $args['alias'] = $results->records[0][$alias_col]; 42 51 } 43 52 }
Note: See TracChangeset
for help on using the changeset viewer.
