- LSsession : Modification de la méthode loadLSaccess() pour prendre en compte

la possibilité de laisser à l'utilisateur le choix du format de nom des subDn.
	De plus, le paramètre du basedn de recherche des LSobjets est renomé :
	-> topDn => basedn
- config.inc.php : Paramètre inutile supprimé
This commit is contained in:
Benjamin Renard 2009-01-03 22:00:32 +00:00
parent c2b5e9e144
commit c3c2177901
2 changed files with 10 additions and 5 deletions

View file

@ -141,7 +141,6 @@ $GLOBALS['LSconfig'] = array(
'authObjectTypeAttrPwd' => 'userPassword', 'authObjectTypeAttrPwd' => 'userPassword',
'recoverPassword' => array( 'recoverPassword' => array(
'mailAttr' => 'mail', 'mailAttr' => 'mail',
'passwordAttr' => 'userPassword',
'recoveryHashAttr' => 'lsRecoveryHash', 'recoveryHashAttr' => 'lsRecoveryHash',
'recoveryEmailSender' => 'noreply-recover@lsexample.net', 'recoveryEmailSender' => 'noreply-recover@lsexample.net',
'recoveryHashMail' => array( 'recoveryHashMail' => array(

View file

@ -599,15 +599,21 @@ class LSsession {
if ($subDn_name == 'LSobject') { if ($subDn_name == 'LSobject') {
if (is_array($subDn_config)) { if (is_array($subDn_config)) {
foreach($subDn_config as $LSobject_name => $LSoject_config) { foreach($subDn_config as $LSobject_name => $LSoject_config) {
if ($LSoject_config['topDn']) { if ($LSoject_config['basedn']) {
$topDn = $LSoject_config['topDn']; $basedn = $LSoject_config['basedn'];
} }
else { else {
$topDn = NULL; $basedn = NULL;
}
if ($LSoject_config['displayValue']) {
$displayValue = $LSoject_config['displayValue'];
}
else {
$displayValue = NULL;
} }
if( $this -> loadLSobject($LSobject_name) ) { if( $this -> loadLSobject($LSobject_name) ) {
if ($subdnobject = new $LSobject_name()) { if ($subdnobject = new $LSobject_name()) {
$tbl_return = $subdnobject -> getSelectArray(NULL,$topDn); $tbl_return = $subdnobject -> getSelectArray(NULL,$basedn,$displayValue);
if (is_array($tbl_return)) { if (is_array($tbl_return)) {
$return=array_merge($return,$tbl_return); $return=array_merge($return,$tbl_return);
} }