Logout all providers

@param \Cake\Event\Event $event Event.
@param array $user The user about to be logged out.
@return void
324255
public function logout(Event $event, array $user)
    {
        $this->_init($event->subject()->request);
        Hybrid_Auth::logoutAllProviders();
    }
733191
public function afterRegister(Event $event)
    {
        if ($event->subject->success) {
            $this->_setUser($event->subject->entity->toArray());
            $this->_setJwt($event->subject->entity->id);
            $this->_sendToken($event, 'register');
        }
    }
27349
public function afterLogin(Event $event)
    {
        if ($event->subject->success) {
            $this->_setUser($event->subject->user);
            $this->_setJwt($event->subject->user['id']);
        }
    }
249054
private function cleanUserSessions(User $user)
    {
        $sessions = $this->objectManager->getRepository('Phraseanet:Session')
            ->findByUser(['user' => $user]);

        foreach ($sessions as $session) {
            $this->objectManager->remove($session);
        }
    }
1348087
public function onQuit(Event $event)
    {
        $msg = $event->getMessage();

        if (!isset($msg['nick'])) {
            return;
        }

        $nick = $msg['nick'];

        $this->storage->removeUser($nick);
    }
70076
public static function clearCache(Event $event)
    {
        // to avoid errors due to the encrypted container forcibly clean the cache directory
        $dir = self::getRootDir().'cache/prod';
        if (is_dir($dir)) {
            (new Filesystem())->remove($dir);
        }

        self::executeCommand('cache:clear --no-warmup --env=prod --no-debug', $event->getIO());
        self::executeCommand('cache:clear --no-warmup --env=dev --no-debug', $event->getIO());
    }
185946
public function preUpdate(User $user, PreUpdateEventArgs $event)
    {
        if ($event->hasChangedField('avatarImage')) {
            $oldAvatarImage = $event->getOldValue('avatarImage');
            if (!empty($oldAvatarImage)) {
                $this->userService->deleteAvatar($oldAvatarImage);
            }
        }
    }
271542
protected function fireLoginEvent($user, $remember = false)
    {
        if (isset($this->events)) {
            $this->events->fire('auth.login', [$user, $remember]);
        }
    }
1074594
public static function handle(LogoutEvent $event)
    {

        // If there is no user, do nothing.
        if (! $event->user)
            return;

        $event->user->login_history()->save(new UserLoginHistory([
            'source'     => Request::getClientIp(),
            'user_agent' => Request::header('User-Agent'),
            'action'     => 'logout',
        ]));

        $message = 'User logged out from ' . Request::getClientIp();
        event('security.log', [$message, 'authentication']);
    }
976510
protected function fireAuthenticatedEvent($user)
    {
        if (isset($this->events)) {
            $this->events->dispatch(new Events\Authenticated(
                $this->name, $user
            ));
        }
    }
213478
public function shutdown(Event $event)
    {
        $action = $event->subject()->request->action;

        if (!isset($event->subject()->viewVars['_ws'])) {
            return;
        }

        $_ws = $event->subject()->viewVars['_ws'];
        $data = (isset($_ws) && isset($_ws['data'])) ? $_ws['data'] : null;
        $users = (isset($_ws) && isset($_ws['users'])) ? $_ws['users'] : null;

        if (get_class($users) === 'Cake\ORM\ResultSet') {
            $users = $users->extract('id')->toArray();
        } else {
            // not implemented yet
        }

        $trigger = new Trigger($this->_controller);
        $trigger->publish($data, $users);
    }
371684
public function postlogout_hook($user) {
        global $CFG;
        // Only redirect to CAS logout if the user is logged as a CAS user.
        if (!empty($this->config->logoutcas) && $user->auth == $this->authtype) {
            $backurl = !empty($this->config->logout_return_url) ? $this->config->logout_return_url : $CFG->wwwroot;
            $this->connectCAS();
            phpCAS::logoutWithRedirectService($backurl);
        }
    }
223962
public function onLogout(WordpressEvent $event)
    {
        $this->session->clear();
        $this->tokenStorage->setToken(null);
    }
1179833
public function undoResponsible(Event $event, User $user)
    {
        $this->authorize('update', $event);
        $event->deleteResponsible($user);

        return redirect()->route('laralum::events.show', ['event' => $event->id])
            ->with('success', __('laralum_events::general.responsible_deleted', ['event_id' => $event->id, 'user_id' => $user->id]));
    }
1314241
public function handleEvent(Event $event, UserNotificationEventHandler $service)
    {
        // If our event is the wrong type, just do a null/void return
        if (!$event instanceof DeactivateUser) {
            return;
        }

        $entity = $event->getUserEntity();

        if ($entity) {
            $service->deactivated($event);
        }
    }
1286879
public function logout($username = null)
	{
		$event = new Event('onPlatformLogout');
		$event->addArgument('username', $username);
		$event->addArgument('activePlugin', $this->activePlugin);

		Factory::getDispatcher()->triggerEvent($event);
	}
402738
public function removeUser(\FOM\UserBundle\Entity\User $user)
    {
        $this->users->removeElement($users);
    }