return false;
}
$this->Group =& $Group;
+
+ $hook_params = array ();
+ $hook_params['role'] =& $this;
+ plugin_hook ("role_get", $hook_params);
+
+
if (!$role_id) {
//setting up an empty object
//probably going to call create()
}
// }
+
+ $hook_params = array ();
+ $hook_params['role'] =& $this;
+ $hook_params['role_id'] = $this->getID();
+ $hook_params['data'] = $data;
+ plugin_hook ("role_update", $hook_params);
+
+
db_commit();
$this->fetchData($this->getID());
return true;
}
// }
+
+ $hook_params = array ();
+ $hook_params['role'] =& $this;
+ $hook_params['role_id'] = $this->getID();
+ $hook_params['user_id'] = $user_id;
+ plugin_hook ("role_setuser", $hook_params);
+
+
db_commit();
return true;
Unlike the groupmenu hook, this hook should use the PrintSubMenu
method to display the tab itself.
+ Hook Name : role_get
+ Locations : common/include/Role.class.php
+ Description: Provides a place to read role from another subsystem (LDAP, DB,
+ etc...)
+
+ Hook Name : role_update
+ Locations : common/include/Role.class.php
+ Description: Triggered when new a role is updated
+
+ Hook Name : role_setuser
+ Locations : common/include/Role.class.php
+ Description: Provides a way to extend the way user information are stored
-- Roland Mas <lolando@debian.org>