public function UserController::logout in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/user/src/Controller/UserController.php \Drupal\user\Controller\UserController::logout()
Logs the current user out.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse A redirection to home page.
1 string reference to 'UserController::logout'
- user.routing.yml in core/
modules/ user/ user.routing.yml - core/modules/user/user.routing.yml
File
- core/
modules/ user/ src/ Controller/ UserController.php, line 175 - Contains \Drupal\user\Controller\UserController.
Class
- UserController
- Controller routines for user routes.
Namespace
Drupal\user\ControllerCode
public function logout() {
user_logout();
return $this
->redirect('<front>');
}