app/controllers/backend/UserController.php: Adding activationEmailAction()
This commit is contained in:
parent
e47aa5188e
commit
14eb4a9137
1 changed files with 12 additions and 0 deletions
|
|
@ -97,4 +97,16 @@ class UserController extends \Phalcon\Mvc\Controller
|
||||||
$this->flash->success('The account was: ' . $status);
|
$this->flash->success('The account was: ' . $status);
|
||||||
$this->response->redirect('/admin');
|
$this->response->redirect('/admin');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function activationEmailAction($id)
|
||||||
|
{
|
||||||
|
$user = User::findFirstById($id);
|
||||||
|
if ($user) {
|
||||||
|
$this->eventsManager->fire('auth:onSentActivation', $user);
|
||||||
|
$this->flash->success('Ativation email sent to: ' . $user->email);
|
||||||
|
} else {
|
||||||
|
$this->flash->error('Invalid user: ' . $id);
|
||||||
|
}
|
||||||
|
$this->response->redirect('/admin');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue