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);
|
$user = User::findFirstById($id);
|
||||||
if ($user) {
|
if ($user) {
|
||||||
$this->eventsManager->fire('auth:onSentActivation', $user);
|
if ($user->isSuspended()) {
|
||||||
$this->flash->success('Ativation email sent to: ' . $user->email);
|
$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 {
|
} else {
|
||||||
$this->flash->error('Invalid user: ' . $id);
|
$this->flash->error('Invalid user: ' . $id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue