forked from GNUsocial/gnu-social
Add registration events to EmailregisterAction
This commit is contained in:
parent
d9d9a10b6f
commit
cd0d7be251
@ -240,6 +240,7 @@ class EmailregisterAction extends Action
|
|||||||
|
|
||||||
function setPassword()
|
function setPassword()
|
||||||
{
|
{
|
||||||
|
if (Event::handle('StartRegistrationTry', array($this))) {
|
||||||
if (!empty($this->invitation)) {
|
if (!empty($this->invitation)) {
|
||||||
$email = trim($this->invitation->address);
|
$email = trim($this->invitation->address);
|
||||||
} else if (!empty($this->confirmation)) {
|
} else if (!empty($this->confirmation)) {
|
||||||
@ -310,8 +311,14 @@ class EmailregisterAction extends Action
|
|||||||
throw new Exception('No confirmation thing.');
|
throw new Exception('No confirmation thing.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Event::handle('EndRegistrationTry', array($this));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Event::handle('StartRegisterSuccess', array($this))) {
|
||||||
common_redirect(common_local_url('doc', array('title' => 'welcome')),
|
common_redirect(common_local_url('doc', array('title' => 'welcome')),
|
||||||
303);
|
303);
|
||||||
|
Event::handle('EndRegisterSuccess', array($this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendConfirmEmail($confirm)
|
function sendConfirmEmail($confirm)
|
||||||
|
Loading…
Reference in New Issue
Block a user