X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fclavette_www.git;a=blobdiff_plain;f=www%2Fecrire%2Fauth%2Fldap.php;h=3ceec1098298b8fe7f5846d408c2138ca27ec950;hp=4de7df6348cc49d6d8c7916818f4c0ce9b784fbc;hb=cc641eb476987612f6d6df1a5417c1c5582a8ab8;hpb=7d84a490677fb716a1fd4df260f8eab35f6a8506 diff --git a/www/ecrire/auth/ldap.php b/www/ecrire/auth/ldap.php index 4de7df6..3ceec10 100644 --- a/www/ecrire/auth/ldap.php +++ b/www/ecrire/auth/ldap.php @@ -3,7 +3,7 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2014 * + * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * @@ -136,9 +136,9 @@ function auth_ldap_search($login, $pass, $checkpass=true, $serveur=''){ if (!$ldap = auth_ldap_connect($serveur)) return ''; - $ldap_link = $ldap['link']; - $ldap_base = $ldap['base']; - $desc = $ldap['attributes'] ? $ldap['attributes'] : $GLOBALS['ldap_attributes'] ; + $ldap_link = isset($ldap['link']) ? $ldap['link'] : null; + $ldap_base = isset($ldap['base']) ? $ldap['base'] : null; + $desc = isset($ldap['attributes']) && $ldap['attributes'] ? $ldap['attributes'] : $GLOBALS['ldap_attributes'] ; $logins = is_array($desc['login']) ? $desc['login'] : array($desc['login']);