function UserAuthenticationController::userLogout

Same name in other branches
  1. 9 core/modules/user/src/Controller/UserAuthenticationController.php \Drupal\user\Controller\UserAuthenticationController::userLogout()
  2. 8.9.x core/modules/user/src/Controller/UserAuthenticationController.php \Drupal\user\Controller\UserAuthenticationController::userLogout()
  3. 10 core/modules/user/src/Controller/UserAuthenticationController.php \Drupal\user\Controller\UserAuthenticationController::userLogout()

Logs the user out.

1 call to UserAuthenticationController::userLogout()
UserAuthenticationController::logout in core/modules/user/src/Controller/UserAuthenticationController.php
Logs out a user.

File

core/modules/user/src/Controller/UserAuthenticationController.php, line 343

Class

UserAuthenticationController
Provides controllers for login, login status and logout via HTTP requests.

Namespace

Drupal\user\Controller

Code

protected function userLogout() {
    user_logout();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.