function UserAuthenticationController::logout
Same name in other branches
- 9 core/modules/user/src/Controller/UserAuthenticationController.php \Drupal\user\Controller\UserAuthenticationController::logout()
- 10 core/modules/user/src/Controller/UserAuthenticationController.php \Drupal\user\Controller\UserAuthenticationController::logout()
- 11.x core/modules/user/src/Controller/UserAuthenticationController.php \Drupal\user\Controller\UserAuthenticationController::logout()
Logs out a user.
Return value
\Symfony\Component\HttpFoundation\Response The response object.
1 string reference to 'UserAuthenticationController::logout'
- user.routing.yml in core/
modules/ user/ user.routing.yml - core/modules/user/user.routing.yml
File
-
core/
modules/ user/ src/ Controller/ UserAuthenticationController.php, line 301
Class
- UserAuthenticationController
- Provides controllers for login, login status and logout via HTTP requests.
Namespace
Drupal\user\ControllerCode
public function logout() {
$this->userLogout();
return new Response(NULL, 204);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.