mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
Added createUser hook.
This commit is contained in:
parent
6f85700984
commit
7c26a86550
@ -5,6 +5,7 @@ OC::$CLASSPATH['OC_Contacts_VCard'] = 'apps/contacts/lib/vcard.php';
|
||||
OC::$CLASSPATH['OC_Contacts_Hooks'] = 'apps/contacts/lib/hooks.php';
|
||||
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV'] = 'apps/contacts/lib/connector_sabre.php';
|
||||
OC::$CLASSPATH['OC_Search_Provider_Contacts'] = 'apps/contacts/lib/search.php';
|
||||
OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_Contacts_Hooks', 'createUser');
|
||||
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Contacts_Hooks', 'deleteUser');
|
||||
OCP\Util::connectHook('OC_Calendar', 'getEvents', 'OC_Contacts_Hooks', 'getBirthdayEvents');
|
||||
OCP\Util::connectHook('OC_Calendar', 'getSources', 'OC_Contacts_Hooks', 'getCalenderSources');
|
||||
|
@ -33,6 +33,16 @@
|
||||
* This class contains all hooks.
|
||||
*/
|
||||
class OC_Contacts_Hooks{
|
||||
/**
|
||||
* @brief Add default Addressbooks of a certain user
|
||||
* @param paramters parameters from postDeleteUser-Hook
|
||||
* @return array
|
||||
*/
|
||||
static public function createUser($parameters) {
|
||||
OC_Contacts_Addressbook::addDefault($parameters['uid'],'default','Default Address Book');
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Deletes all Addressbooks of a certain user
|
||||
* @param paramters parameters from postDeleteUser-Hook
|
||||
|
Loading…
x
Reference in New Issue
Block a user