mapping LDAP attributes for new users

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • hi-ko
    replied
    Originally posted by tarasm
    Please, notice if you change this file, it can be overridden by the next upgrade. The best way is contribute code to EspoCRM by improving the code and sending a pull request on github
    done: https://github.com/espocrm/espocrm/pull/157

    Leave a comment:


  • hi-ko
    replied
    Thanks for the feedback. I've seen that cn is hardcoded also in Authentication. So the whole mechanism requires some refactoring ...
    A part which is also missing is a sync job to create users in advance and populate group memberships.
    A good example we also use is the LDAP Sync Module for Redmine https://github.com/thorin/redmine_ldap_sync

    Leave a comment:


  • tarasm
    replied
    Hi,

    Username is mapped to LDAP CN attribute. It was tested on OpenLDAP server.
    The mapping is defined in the file /application/Espo/Core/Utils/Authentication/LDAP.php,
    PHP Code:
    private $fields = array(
            'userName' => 'cn',
            'firstName' => 'givenname',
            'lastName' => 'sn',
            'title' => 'title',
            'emailAddress' => 'mail',
            'phoneNumber' => 'telephonenumber',
        ); 
    

    Please, notice if you change this file, it can be overridden by the next upgrade. The best way is contribute code to EspoCRM by improving the code and sending a pull request on github https://github.com/espocrm/espocrm.

    Information about configuring LDAP is described here http://blog.espocrm.com/administrati...n-for-espocrm/
    Last edited by tarasm; 05-08-2015, 09:41 AM.

    Leave a comment:


  • hi-ko
    started a topic mapping LDAP attributes for new users

    mapping LDAP attributes for new users

    I installed latest EspoCRM and configured Authentication using LDAP againt Active Directory. So far so good.

    I'm not very happy with the attribute mapping. e.g. username should be mapped to sAMAccountName instead of displayName.
    Is this something which is supported to be configured or do I need to patch php files?
    Would it be possible to store an existing external avantar instead of storing the image as attachment first?

    Thanks in advance

    P.S.: To be able to configure multiple Authentication Mechanisms to work at the same time would be very helpful (e.g. internal, ldap1, ldap2)!
Working...