PHP code example of monogramm / mautic-ldapauth-bundle
1. Go to this page and download the library: Download monogramm/mautic-ldapauth-bundle library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
monogramm / mautic-ldapauth-bundle example snippets
//'parameters' => array(
// ...
'ldap_auth_host' => 'ldap.mysupercompany.com',
'ldap_auth_port' => 389,
'ldap_auth_version' => 3,
'ldap_auth_ssl' => false,
'ldap_auth_starttls' => true,
'ldap_auth_base_dn' => 'ou=People,dc=ldap,dc=mysupercompany,dc=com',
'ldap_auth_user_query' => '(objectclass=inetOrgPerson)',
'ldap_auth_username_attribute' => 'uid',
'ldap_auth_email_attribute' => 'mail',
'ldap_auth_firstname_attribute' => 'givenname',
'ldap_auth_lastname_attribute' => 'sn',
'ldap_auth_fullname_attribute' => 'displayname',
'ldap_auth_isactivedirectory' => false,
// ...
//'parameters' => array(
// ...
'ldap_auth_host' => 'ad.mysupercompany.com',
'ldap_auth_port' => 389,
'ldap_auth_version' => 3,
'ldap_auth_ssl' => false,
'ldap_auth_starttls' => false,
'ldap_auth_base_dn' => 'cn=Users,dc=ad,dc=mysupercompany,dc=com',
'ldap_auth_user_query' => '(objectclass=user)(memberof=marketing)', // careful this can be case sensitive!
'ldap_auth_username_attribute' => 'samaccountname', // this is case sensitive!
'ldap_auth_email_attribute' => 'mail',
'ldap_auth_firstname_attribute' => 'givenname',
'ldap_auth_lastname_attribute' => 'sn',
'ldap_auth_fullname_attribute' => 'displayname',
'ldap_auth_isactivedirectory' => true,
'ldap_auth_activedirectory_domain' => 'ad.mysupercompany.com',
// ...