app/controllers/AuthController.php: No need to set event manager anymore
This commit is contained in:
parent
bb12b1a007
commit
863175eb51
1 changed files with 1 additions and 8 deletions
|
|
@ -12,13 +12,6 @@ use App\Controller\ControllerBase,
|
||||||
|
|
||||||
class AuthController extends ControllerBase
|
class AuthController extends ControllerBase
|
||||||
{
|
{
|
||||||
public function initialize()
|
|
||||||
{
|
|
||||||
// We need event manager here from DI.
|
|
||||||
$eventManager = $this->di->get('eventsManager');
|
|
||||||
$this->setEventsManager($eventManager);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$form = new LoginForm();
|
$form = new LoginForm();
|
||||||
|
|
@ -74,7 +67,7 @@ class AuthController extends ControllerBase
|
||||||
$user->{'set' . $name . 'Id'}($data->getId());
|
$user->{'set' . $name . 'Id'}($data->getId());
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
$this->getEventsManager()->fire('user:onOAuthConnected', $user, $data);
|
$this->eventsManager->fire('user:onOAuthConnected', $user, $data);
|
||||||
|
|
||||||
$this->flash->message('success', sprintf("OAuth provider <strong>%s</strong> was connected!", $name));
|
$this->flash->message('success', sprintf("OAuth provider <strong>%s</strong> was connected!", $name));
|
||||||
$this->response->redirect('/settings');
|
$this->response->redirect('/settings');
|
||||||
|
|
|
||||||
Reference in a new issue