Archived
1
0
Fork 0

app/controllers/backend/UserController.php: Adding activationEmailAction()

This commit is contained in:
Henrik Hautakoski 2022-08-27 13:07:52 +02:00
parent e47aa5188e
commit 14eb4a9137

View file

@ -97,4 +97,16 @@ class UserController extends \Phalcon\Mvc\Controller
$this->flash->success('The account was: ' . $status);
$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');
}
}