hook for new group through a form, same as editing
This commit is contained in:
parent
8bf57019c1
commit
2cdba23df4
@ -120,6 +120,7 @@ class NewgroupAction extends Action
|
||||
|
||||
function trySave()
|
||||
{
|
||||
if (Event::handle('StartGroupSaveForm', array($this))) {
|
||||
try {
|
||||
$nickname = Nickname::normalize($this->trimmed('nickname'));
|
||||
} catch (NicknameException $e) {
|
||||
@ -216,8 +217,13 @@ class NewgroupAction extends Action
|
||||
'userid' => $cur->id,
|
||||
'local' => true));
|
||||
|
||||
$this->group = $group;
|
||||
|
||||
Event::handle('EndGroupSaveForm', array($this));
|
||||
|
||||
common_redirect($group->homeUrl(), 303);
|
||||
}
|
||||
}
|
||||
|
||||
function nicknameExists($nickname)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user