You are here

public function UserAuthenticator::nullifySessionKeys in Social API 3.x

Same name and namespace in other branches
  1. 8.2 src/User/UserAuthenticator.php \Drupal\social_api\User\UserAuthenticator::nullifySessionKeys()

Nullifies session keys if user could not logged in.

File

src/User/UserAuthenticator.php, line 143

Class

UserAuthenticator
Manages Drupal authentication tasks for Social API.

Namespace

Drupal\social_api\User

Code

public function nullifySessionKeys() {
  if (!empty($this->sessionKeys)) {
    array_walk($this->sessionKeys, function ($session_key) {
      $this->dataHandler
        ->set($this->dataHandler
        ->getSessionPrefix() . $session_key, NULL);
    });
  }
}