diff --git a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php index 2356c62c..3b0f021e 100644 --- a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php +++ b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php @@ -325,7 +325,7 @@ $GLOBALS['LSobjects']['LSeepeople'] = array ( 'ldap_type' => 'ascii', 'html_type' => 'text', 'required' => 1, - 'generate_function' => 'generate_sambaSID', + 'generate_function' => 'generate_sambaUserSID', 'rights' => array( 'admin' => 'r' ), diff --git a/trunk/includes/class/class.LSldapObject.php b/trunk/includes/class/class.LSldapObject.php index f4f44295..bcdc947e 100644 --- a/trunk/includes/class/class.LSldapObject.php +++ b/trunk/includes/class/class.LSldapObject.php @@ -1226,7 +1226,15 @@ class LSldapObject { * @retval True en cas de cas ce succès, False sinon. */ 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; }