public UserController::logout()
Logs the current user out.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse A redirection to home page.
File
- core/modules/user/src/Controller/UserController.php, line 280
Class
- UserController
- Controller routines for user routes.
Namespace
Drupal\user\Controller
Code
public function logout() { user_logout(); return $this->redirect('<front>'); }
Please login to continue.