예제 #1
0
 /**
  * Updates user's last login time
  */
 public function onUserLogin(LoginEvent $event)
 {
     $this['users']->getUserRepository()->updateLogin($event->getUser());
 }
예제 #2
0
 /**
  * Redirects to migration page on login.
  *
  * @param LoginEvent $event
  */
 public function onLogin(LoginEvent $event)
 {
     if ($event->getUser()->hasAccess('system: software updates') && $this['migrator']->create('extension://system/migrations', $this['option']->get('system:version'))->get()) {
         $event->setResponse($this['response']->redirect('@system/migration'));
     }
 }
 /**
  * Redirects a user after successful login.
  *
  * @param LoginEvent $event
  */
 public function onLogin(LoginEvent $event)
 {
     $event->setResponse(new RedirectResponse($this->app['request']->get(Auth::REDIRECT_PARAM)));
 }