Author Topic: New user plugin not fetching information and filling identities  (Read 5273 times)

Offline Nivek465

  • Newbie
  • *
  • Posts: 1
New user plugin not fetching information and filling identities
« on: November 08, 2023, 04:23:07 AM »
Greetings,

Currently, on roundcube 1.6.

Config file has been modified to contact our ldap server, and request from contacts tab to the address book are fine when tested (full fetch)
However, when a new user connects to the server, the new_user_plugin does not fill identities information, we've checked the ldap.logs and a request is written

In quote the ldap.log when my new test user is logging in for the first time, followed by a address book request from the contacts category

Code: [Select]
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> C: Connect [ldap://ldap.test.fr:389]
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> S: OK
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> C: Bind [dn: cn=admin,dc=test,dc=fr]
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> S: OK
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> C: Search base dn: [dc=test,dc=fr] scope [sub] with filter [(&(&(objectClass=supannPerson)(memberOf=cn=annuaire,ou=services,ou=groups,dc=test,dc=fr))(|(uid=nivek)))]
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> Using function ldap_search on scope sub ($ns_function is ldap_search)
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> C: (Without VLV) Setting a filter of (&(&(objectClass=supannPerson)(memberOf=cn=annuaire,ou=services,ou=groups,dc=test,dc=fr))(|(uid=nivek)))
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> Executing search with return attributes: array (
  0 => 'supannaliaslogin',
  1 => 'cn',
  2 => 'sn',
  3 => 'givenname',
  4 => 'title',
  5 => 'mail',
  6 => 'telephonenumber',
  7 => 'postaladdress',
  8 => 'ou',
  9 => 'o',
  10 => 'objectClass',
)
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> S: 0 record(s) found
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> C: Search base dn: [dc=test,dc=fr] scope [sub] with filter [(&(&(objectClass=supannPerson)(memberOf=cn=annuaire,ou=services,ou=groups,dc=test,dc=fr))(|(uid=nivek)))]
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> Using function ldap_search on scope sub ($ns_function is ldap_search)
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> C: (Without VLV) Setting a filter of (&(&(objectClass=supannPerson)(memberOf=cn=annuaire,ou=services,ou=groups,dc=test,dc=fr))(|(uid=nivek)))
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> Executing search with return attributes: array (
  0 => 'dn',
)
[07-Nov-2023 16:53:47 +0100]: <2ksfec5e> S: 0 record(s) found

[07-Nov-2023 16:53:52 +0100]: <jg64c6p1> C: Connect [ldap://ldap.test.fr:389]
[07-Nov-2023 16:53:52 +0100]: <jg64c6p1> S: OK
[07-Nov-2023 16:53:52 +0100]: <jg64c6p1> C: Bind [dn: cn=admin,dc=test,dc=fr]
[07-Nov-2023 16:53:52 +0100]: <jg64c6p1> S: OK
[07-Nov-2023 16:53:52 +0100]: <jg64c6p1> C: Search base dn: [dc=test,dc=fr] scope [sub] with filter [(&(objectClass=supannPerson)(memberOf=cn=annuaire,ou=services,ou=groups,dc=test,dc=fr))]
[07-Nov-2023 16:53:52 +0100]: <jg64c6p1> Using function ldap_search on scope sub ($ns_function is ldap_search)
[07-Nov-2023 16:53:52 +0100]: <jg64c6p1> C: (Without VLV) Setting a filter of (&(objectClass=supannPerson)(memberOf=cn=annuaire,ou=services,ou=groups,dc=test,dc=fr))
[07-Nov-2023 16:53:52 +0100]: <jg64c6p1> Executing search with return attributes: array (
  0 => 'supannaliaslogin',
  1 => 'cn',
  2 => 'sn',
  3 => 'givenname',
  4 => 'title',
  5 => 'mail',
  6 => 'telephonenumber',
  7 => 'postaladdress',
  8 => 'ou',
  9 => 'o',
  10 => 'objectClass',
)
[07-Nov-2023 16:54:12 +0100]: <jg64c6p1> S: 5865 record(s) found
[07-Nov-2023 16:54:12 +0100]: <jg64c6p1> C: Close

Here is our information in the config.inc.php

Code: [Select]
$config['ldap_public'] = array (
  'Annuaire_TEST' =>
  array (
    'name' => 'Ecole',
    'hosts' =>
    array (
      0 => 'ldap.test.fr',
    ),
    'port' => 389,
    'use_tls' => false,
    'ldap_version' => 3,
    'user_specific' => false,
    'base_dn' => 'dc=test,dc=fr',
    'bind_dn' => 'cn=admin,dc=test,dc=fr',
    'bind_pass' => 'password',
    'search_base_dn' => 'ou=people,dc=test,dc=fr',   
'search_filter' => '(memberOf=cn=annuaire,ou=services,ou=groups,dc=ens,dc=fr)',
    'hidden' => false,
    'writable' => false,
    'required_fields' =>
    array (
      0 => 'cn',
      1 => 'sn',
      2 => 'mail',
    ),
    'search_fields' =>
    array (
      0 => 'sn',
      1 => 'mail',
      2 => 'cn',
      3 => 'supannAliasLogin',
    ),
    'email_field' => 'mail',
    'name_field' => 'cn',
    'surname_field' => 'sn',
    'fieldmap' =>
    array (
      'uid' => 'supannAliasLogin',
      'name' => 'cn',
      'surname' => 'sn',
      'firstname' => 'givenName',
      'jobtitle' => 'title',
      'email' => 'mail',
      'phone:work' => 'telephoneNumber',
      'address' => 'postalAddress',
      'department' => 'ou',
      'organization' => 'o',
    ),
    'sort' => 'cn',
    'scope' => 'sub',
    'filter' => '(&(objectClass=supannPerson)(memberOf=cn=annuaire,ou=services,ou=groups,dc=test,dc=fr))',
    'fuzzy_search' => true,
    'vlv' => false,
    'sizelimit' => '0',
    'timelimit' => '0',
  ),
);

Code: [Select]
$config['new_user_identity_addressbook'] = 'Annuaire_TEST';
$config['new_user_identity_match'] = 'uid';

SupannAliasLogin is a custom attribute we use for their login, such as John Doe is jdoe for his SupannAliasLogin.

Any tips or recommendation is greatly appreciated,

Best regards.
« Last Edit: November 08, 2023, 04:38:39 AM by Nivek465 »

Offline nymphick

  • Newbie
  • *
  • Posts: 3
Re: New user plugin not fetching information and filling identities
« Reply #1 on: March 01, 2024, 10:31:05 AM »
Same settings. The new_user_plugin does not fill identities information. Does this work for anyone?