* Show the right menus in the aside after successful registration

* Events surrounding successful registration output
This commit is contained in:
Zach Copley 2011-04-14 15:45:05 -07:00
parent 70c8de4354
commit 951ee1faff
2 changed files with 62 additions and 43 deletions

View File

@ -1375,3 +1375,9 @@ EndProfileGetAvatar: After getting an avatar for a profile
- $profile: profile - $profile: profile
- $size: size of the avatar - $size: size of the avatar
- &$avatar: avatar - &$avatar: avatar
StartRegisterSuccess: Before showing the registration success message
- $action: the registration action
StartRegisterSuccess: After showing the registration success message
- $action: the registration action

View File

@ -605,6 +605,8 @@ class RegisterAction extends Action
*/ */
function showSuccessContent() function showSuccessContent()
{ {
if (Event::handle('onStartRegisterSuccess', array($this))) {
$nickname = $this->arg('nickname'); $nickname = $this->arg('nickname');
$profileurl = common_local_url('showstream', $profileurl = common_local_url('showstream',
@ -647,6 +649,9 @@ class RegisterAction extends Action
$this->raw(common_markup_to_html($emailinstr)); $this->raw(common_markup_to_html($emailinstr));
} }
$this->elementEnd('div'); $this->elementEnd('div');
Event::handle('onEndRegisterSuccess', array($this));
}
} }
/** /**
@ -656,15 +661,23 @@ class RegisterAction extends Action
*/ */
function showLocalNav() function showLocalNav()
{ {
if (common_logged_in()) {
parent::showLocalNav();
} else {
$nav = new LoginGroupNav($this); $nav = new LoginGroupNav($this);
$nav->show(); $nav->show();
} }
function showNoticeForm()
{
} }
/**
* Show a bit of login context
*
* @return nothing
*/
function showProfileBlock() function showProfileBlock()
{ {
if (common_logged_in()) {
parent::showProfileBlock();
}
} }
} }