1
0
Fork 0
mirror of https://github.com/dducret/kopano-webapp-passwd synced 2026-07-27 18:42:47 +02:00

add option to not strip everything after the @

Usefull if you use email-adress as login
This commit is contained in:
Sander Hoentjen 2014-03-03 12:19:22 +01:00
commit 6f047d4c7f
2 changed files with 11 additions and 3 deletions

View file

@ -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
$parts = explode('@', $data['username']);
$uid = $parts[0];
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 (