diff --git a/admin/editaccount.php b/admin/editaccount.php index 7797882b82..fb53b64f11 100755 --- a/admin/editaccount.php +++ b/admin/editaccount.php @@ -24,7 +24,7 @@ if ($submit) { $totalerrors = 0; - if ($phpgw_info["server"]["account_repository"] == "ldap") { + if ($phpgw_info["server"]["account_repository"] == "ldap" && ! $allow_long_loginids) { if (strlen($n_loginid) > 8) { $error[$totalerrors++] = lang("The loginid can not be more then 8 characters"); } diff --git a/admin/inc/accounts_ldap.inc.php b/admin/inc/accounts_ldap.inc.php index a7c3c0945d..37a4fd10f8 100644 --- a/admin/inc/accounts_ldap.inc.php +++ b/admin/inc/accounts_ldap.inc.php @@ -14,6 +14,10 @@ // Sections of code where taking from slapda http://www.jeremias.net/projects/sldapa by // Jason Jeremias + // This is a local config option, I didn't make it global. Becuase most people will leave it on + // and its something that doesn't need to be in the config table. + $allow_long_loginids = False; + $ldap = ldap_connect($phpgw_info["server"]["ldap_host"]); diff --git a/admin/newaccount.php b/admin/newaccount.php index 213ca903e3..f3d3cd2d91 100755 --- a/admin/newaccount.php +++ b/admin/newaccount.php @@ -43,7 +43,7 @@ if ($submit) { $totalerrors = 0; - if ($phpgw_info["server"]["account_repository"] == "ldap") { + if ($phpgw_info["server"]["account_repository"] == "ldap" && ! $allow_long_loginids) { if (strlen($n_loginid) > 8) { $error[$totalerrors++] = lang("The loginid can not be more then 8 characters"); } diff --git a/setup/config.php b/setup/config.php index 2655b0ed0f..44dfe33ae8 100644 --- a/setup/config.php +++ b/setup/config.php @@ -127,6 +127,7 @@