app/controllers/backend/UserController.php: in activationEmailAction() only send activation email to suspended users.
This commit is contained in:
parent
4ff351d39d
commit
8048b3fda8
1 changed files with 6 additions and 2 deletions
|
|
@ -102,8 +102,12 @@ class UserController extends \Phalcon\Mvc\Controller
|
|||
{
|
||||
$user = User::findFirstById($id);
|
||||
if ($user) {
|
||||
$this->eventsManager->fire('auth:onSentActivation', $user);
|
||||
$this->flash->success('Ativation email sent to: ' . $user->email);
|
||||
if ($user->isSuspended()) {
|
||||
$this->eventsManager->fire('auth:onSentActivation', $user);
|
||||
$this->flash->success('Ativation email sent to: ' . $user->email);
|
||||
} else {
|
||||
$this->flash->error('Only suspended users can be sent activation emails.');
|
||||
}
|
||||
} else {
|
||||
$this->flash->error('Invalid user: ' . $id);
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue