mirror of
https://github.com/silentsakky/zarafa-webapp-passwd
synced 2026-07-27 10:30:56 +02:00
add option to not strip everything after the @
Usefull if you use email-adress as login
This commit is contained in:
parent
4a3d715321
commit
6f047d4c7f
2 changed files with 11 additions and 3 deletions
|
|
@ -10,4 +10,8 @@ define('PLUGIN_PASSWD_LDAP_BASEDN', 'dc=example,dc=com');
|
|||
|
||||
/** URI to access LDAP server **/
|
||||
define('PLUGIN_PASSWD_LDAP_URI', 'localhost');
|
||||
|
||||
/** Set to true if you login with username@tenantname **/
|
||||
define('PLUGIN_PASSWD_LOGIN_WITH_TENANT', false);
|
||||
|
||||
?>
|
||||
|
|
@ -90,8 +90,12 @@ class PasswdModule extends Module
|
|||
// check connection is successfull
|
||||
if(ldap_errno($ldapconn) === 0) {
|
||||
// get the users uid, if we have a multi tenant installation then remove company name from user name
|
||||
if (PLUGIN_PASSWD_LOGIN_WITH_TENANT){
|
||||
$parts = explode('@', $data['username']);
|
||||
$uid = $parts[0];
|
||||
} else {
|
||||
$uid = $data['username'];
|
||||
}
|
||||
|
||||
// search for the user dn that will be used to do login into LDAP
|
||||
$userdn = ldap_search (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue