UserCacheContextBase::$user

The account object. Type: \Drupal\Core\Session\AccountInterface File core/lib/Drupal/Core/Cache/Context/UserCacheContextBase.php, line 21 Class UserCacheContextBase Base class for user-based cache contexts. Namespace Drupal\Core\Cache\Context Code protected $user;

UserAuthenticationController::userLogout

protected UserAuthenticationController::userLogout() Logs the user out. File core/modules/user/src/Controller/UserAuthenticationController.php, line 247 Class UserAuthenticationController Provides controllers for login, login status and logout via HTTP requests. Namespace Drupal\user\Controller Code protected function userLogout() { user_logout(); }

UserAuthenticationController::__construct

public UserAuthenticationController::__construct(FloodInterface $flood, UserStorageInterface $user_storage, CsrfTokenGenerator $csrf_token, UserAuthInterface $user_auth, RouteProviderInterface $route_provider, Serializer $serializer, array $serializer_formats) Constructs a new UserAuthenticationController object. Parameters \Drupal\Core\Flood\FloodInterface $flood: The flood controller. \Drupal\user\UserStorageInterface $user_storage: The user storage. \Drupal\Core\Access\CsrfTokenGenerator $c

UserAuthenticationController::userLoginFinalize

protected UserAuthenticationController::userLoginFinalize(UserInterface $user) Finalizes the user login. Parameters \Drupal\user\UserInterface $user: The user. File core/modules/user/src/Controller/UserAuthenticationController.php, line 229 Class UserAuthenticationController Provides controllers for login, login status and logout via HTTP requests. Namespace Drupal\user\Controller Code protected function userLoginFinalize(UserInterface $user) { user_login_finalize($user); }

UserAuthenticationController::logout

public UserAuthenticationController::logout() Logs out a user. Return value \Drupal\rest\ResourceResponse The response object. File core/modules/user/src/Controller/UserAuthenticationController.php, line 239 Class UserAuthenticationController Provides controllers for login, login status and logout via HTTP requests. Namespace Drupal\user\Controller Code public function logout() { $this->userLogout(); return new Response(NULL, 204); }

UserAuthenticationController::login

public UserAuthenticationController::login(Request $request) Logs in a user. Parameters \Symfony\Component\HttpFoundation\Request $request: The request. Return value \Symfony\Component\HttpFoundation\Response A response which contains the ID and CSRF token. File core/modules/user/src/Controller/UserAuthenticationController.php, line 151 Class UserAuthenticationController Provides controllers for login, login status and logout via HTTP requests. Namespace Drupal\user\Controller Code p

UserAuthenticationController::userIsBlocked

protected UserAuthenticationController::userIsBlocked($name) Verifies if the user is blocked. Parameters string $name: The username. Return value bool TRUE if the user is blocked, otherwise FALSE. File core/modules/user/src/Controller/UserAuthenticationController.php, line 219 Class UserAuthenticationController Provides controllers for login, login status and logout via HTTP requests. Namespace Drupal\user\Controller Code protected function userIsBlocked($name) { return user_is_blo

UserAuthenticationController::loginStatus

public UserAuthenticationController::loginStatus() Checks whether a user is logged in or not. Return value \Symfony\Component\HttpFoundation\Response The response. File core/modules/user/src/Controller/UserAuthenticationController.php, line 257 Class UserAuthenticationController Provides controllers for login, login status and logout via HTTP requests. Namespace Drupal\user\Controller Code public function loginStatus() { if ($this->currentUser()->isAuthenticated()) { $resp

UserAuthenticationController::getRequestFormat

protected UserAuthenticationController::getRequestFormat(Request $request) Gets the format of the current request. Parameters \Symfony\Component\HttpFoundation\Request $request: The current request. Return value string The format of the request. File core/modules/user/src/Controller/UserAuthenticationController.php, line 277 Class UserAuthenticationController Provides controllers for login, login status and logout via HTTP requests. Namespace Drupal\user\Controller Code protected fun

UserAuthenticationController::floodControl

protected UserAuthenticationController::floodControl(Request $request, $username) Enforces flood control for the current login request. Parameters \Symfony\Component\HttpFoundation\Request $request: The current request. string $username: The user name sent for login credentials. File core/modules/user/src/Controller/UserAuthenticationController.php, line 293 Class UserAuthenticationController Provides controllers for login, login status and logout via HTTP requests. Namespace Drupal\us