You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have very long email adresses, yet we use them as login names. When using mail adresses as uid, they are too long to fit into the php list user table row with 25 chars limited. So we switch to the ldap uid silently after login succeeeds.
Patch included. Works correctly so far, not extensively tested.
diff --git a/phplist-3.3.4/public_html/lists/admin/plugins/ldapAuth.php b/phplist-3.3.4/public_html/lists/admin/plugins/ldapAuth.php
index 8e48dd8..066f5f3 100644
--- a/phplist-3.3.4/public_html/lists/admin/plugins/ldapAuth.php
+++ b/phplist-3.3.4/public_html/lists/admin/plugins/ldapAuth.php
@@ -173,6 +173,14 @@ class ldapAuth extends phplistPlugin {
// check to see if it worked
if (strval(strtolower($myResult[0])) == $login) {
+
+ // When using mail as login, it may be too long for database field.
+ // from here on we continue with uid ( max.mueller@mail.com => mmueller )
+ $login = $myResult[2]['uid'][0];
+ //echo "\nldap:" . $login . "\n";
+ //var_dump($myResult[2]);
+ //return array(0, 'hw error');
+
// see if there is an existing record
$admindata = Sql_Fetch_Array_Query(sprintf('select password,disabled,id from %s where loginname = "%s"',$GLOBALS["tables"]["admin"],addslashes($login)));
The text was updated successfully, but these errors were encountered:
We have very long email adresses, yet we use them as login names. When using mail adresses as uid, they are too long to fit into the php list user table row with 25 chars limited. So we switch to the ldap uid silently after login succeeeds.
Patch included. Works correctly so far, not extensively tested.
The text was updated successfully, but these errors were encountered: