events for creating a group
This commit is contained in:
parent
5fee38b025
commit
2682915b99
|
@ -1063,3 +1063,9 @@ StartGroupEditFormData: Beginning the group edit form entries
|
|||
|
||||
EndGroupEditFormData: Ending the group edit form entries
|
||||
- $form: The form widget being shown
|
||||
|
||||
StartGroupSave: After initializing but before saving a group
|
||||
- &$group: group about to be saved
|
||||
|
||||
EndGroupSave: After saving a group, aliases, and first member
|
||||
- $group: group that was saved
|
||||
|
|
|
@ -512,6 +512,8 @@ class User_group extends Memcached_DataObject
|
|||
$group->mainpage = $mainpage;
|
||||
$group->created = common_sql_now();
|
||||
|
||||
if (Event::handle('StartGroupSave', array(&$group))) {
|
||||
|
||||
$result = $group->insert();
|
||||
|
||||
if (!$result) {
|
||||
|
@ -570,6 +572,10 @@ class User_group extends Memcached_DataObject
|
|||
}
|
||||
|
||||
$group->query('COMMIT');
|
||||
|
||||
Event::handle('EndGroupSave', array($group));
|
||||
}
|
||||
|
||||
return $group;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user