Roundcube Community Forum

 

Can not set default identity with new_user_identity

Started by kazimk, June 06, 2020, 07:59:36 AM

Previous topic - Next topic

kazimk

Hello,

I installed roundcube 1.4.5 and configured address book to get data from OpenLDAP but I could not achieve to get default identity from ldap. It always set it to username. Any help appretiated.



My configuration is like below.
$config['plugins'] = array('debug_logger', 'new_user_identity', 'archive', 'attachment_reminder', 'filesystem_attachments', 'jqueryui', 'markasjunk', 'newmail_notifier', 'password', 'zipdownload');

//new_user_identity.inc.php
$config['new_user_identity_addressbook'] = 'People';
$config['new_user_identity_match'] = 'uid';
$config['new_user_identity_onlogin'] = true;


$config['ldap_public']['People'] = array(
    'name'              => 'People',
    'hosts'             => array('localhost'),
    'port'              => 389,
    'user_specific'     => false,
    'base_dn'           => 'ou=org,dc=univ,dc=edu',
    'bind_dn'           => 'uid=user1,ou=org,dc=univ,dc=edu',
    'bind_pass'         => 'xxx',
    'search_only' => true,
    'hidden' => true,
    'writable' => false,
    'filter'            => '(objectClass=inetOrgPerson)',
        'search_fields'   => array('uid', 'givenName', 'cn', 'sn'),  // fields to search in
    'fieldmap' => array(
       // Roundcube   => LDAP
    'name'         => 'cn',
    'surname'      => 'sn',
    'firstname'    => 'givenName',
),
    'scope'          => 'sub',
);



Regards.

alec

I'm not sure what do you mean by " It always set it to username". I think you might need to add 'email' and 'uid' fields to fieldmap.

kazimk

#2
Hello,

Thanks for your answer. I only added field below since we do not have mail attribute in our LDAP but result does not change. We also use username without domain as login name in roundcube. Our users default identity became "username <username@domain>". I can make search in address book from roundcube interface so LDAP address book setting works.  I want to set it Full Name instead of username.

'username'    => 'uid',

Regards.

alec

$config['new_user_identity_match'] = 'uid'; -- this is the field name, i.e. the left-side in fieldmap.

kazimk

#4
Hello,

I tried two combination in fieldmap, the result is same.

'uid'    => 'email',

and

'email'    => 'uid',

alec


kazimk

I tried . Default identity still  like "username <username@domain>".

kazimk

I solved issue with reimport mysql.initial.sql file. Now it seem correct. Thanks everybody.