mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-23 02:19:07 +01:00
- LSldapObject : Ajout de fireEvent sur les LSattributes de l'objet
dans les méthodes beforeDelete() et afterDelete() - Config. LSeepeople : oubli generate_sambaSID() -> generate_sambaUserSID()
This commit is contained in:
parent
6957badce8
commit
e5480740cf
2 changed files with 16 additions and 2 deletions
|
@ -325,7 +325,7 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
|
||||||
'ldap_type' => 'ascii',
|
'ldap_type' => 'ascii',
|
||||||
'html_type' => 'text',
|
'html_type' => 'text',
|
||||||
'required' => 1,
|
'required' => 1,
|
||||||
'generate_function' => 'generate_sambaSID',
|
'generate_function' => 'generate_sambaUserSID',
|
||||||
'rights' => array(
|
'rights' => array(
|
||||||
'admin' => 'r'
|
'admin' => 'r'
|
||||||
),
|
),
|
||||||
|
|
|
@ -1226,7 +1226,15 @@ class LSldapObject {
|
||||||
* @retval True en cas de cas ce succès, False sinon.
|
* @retval True en cas de cas ce succès, False sinon.
|
||||||
*/
|
*/
|
||||||
function beforeDelete() {
|
function beforeDelete() {
|
||||||
return $this -> updateLSrelationsCache();
|
$return = $this -> updateLSrelationsCache();
|
||||||
|
|
||||||
|
foreach(array_keys($this -> attrs) as $attr_name) {
|
||||||
|
if (!$this -> attrs[$attr_name] -> fireEvent('before_delete')) {
|
||||||
|
$return = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1277,6 +1285,12 @@ class LSldapObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach(array_keys($this -> attrs) as $attr_name) {
|
||||||
|
if (!$this -> attrs[$attr_name] -> fireEvent('after_delete')) {
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return !$error;
|
return !$error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue