Added hook for postCreateUser. Probably fix for oc-1265.
This commit is contained in:
parent
4b8a34df21
commit
258df5eea2
2 changed files with 13 additions and 1 deletions
|
@ -10,6 +10,7 @@ OC::$CLASSPATH['OC_Calendar_Share'] = 'apps/calendar/lib/share.php';
|
|||
OC::$CLASSPATH['OC_Search_Provider_Calendar'] = 'apps/calendar/lib/search.php';
|
||||
OC::$CLASSPATH['OC_Calendar_Export'] = 'apps/calendar/lib/export.php';
|
||||
//General Hooks
|
||||
OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_Calendar_Hooks', 'createUser');
|
||||
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser');
|
||||
//Repeating Events Hooks
|
||||
OCP\Util::connectHook('OC_Calendar', 'addEvent', 'OC_Calendar_Repeat', 'generate');
|
||||
|
|
|
@ -11,7 +11,18 @@
|
|||
*/
|
||||
class OC_Calendar_Hooks{
|
||||
/**
|
||||
* @brief Deletes all Addressbooks of a certain user
|
||||
* @brief Creates default calendar for a user
|
||||
* @param paramters parameters from postCreateUser-Hook
|
||||
* @return array
|
||||
*/
|
||||
public static function createUser($parameters) {
|
||||
OC_Calendar_Calendar::addCalendar($parameters['uid'],'Default calendar');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Deletes all calendars of a certain user
|
||||
* @param paramters parameters from postDeleteUser-Hook
|
||||
* @return array
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue