UserController::$userStorage

The user storage. Type: \Drupal\user\UserStorageInterface File core/modules/user/src/Controller/UserController.php, line 35 Class UserController Controller routines for user routes. Namespace Drupal\user\Controller Code protected $userStorage;

UserController::confirmCancel

public UserController::confirmCancel(UserInterface $user, $timestamp = 0, $hashed_pass = '') Confirms cancelling a user account via an email link. Parameters \Drupal\user\UserInterface $user: The user account. int $timestamp: The timestamp. string $hashed_pass: The hashed password. Return value \Symfony\Component\HttpFoundation\RedirectResponse A redirect response. File core/modules/user/src/Controller/UserController.php, line 298 Class UserController Controller routines for user routes.

UserController::create

public static UserController::create(ContainerInterface $container) Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The service c

UserController::getResetPassForm

public UserController::getResetPassForm(Request $request, $uid) Returns the user password reset form. Parameters \Symfony\Component\HttpFoundation\Request $request: The request. int $uid: User ID of the user requesting reset. Return value array|\Symfony\Component\HttpFoundation\RedirectResponse The form structure or a redirect response. Throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException If the pass_reset_timeout or pass_reset_hash are not available in the session. Or if

UserController::logout

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>'); }

UserController::resetPass

public UserController::resetPass(Request $request, $uid, $timestamp, $hash) Redirects to the user password reset form. In order to never disclose a reset link via a referrer header this controller must always return a redirect response. Parameters \Symfony\Component\HttpFoundation\Request $request: The request. int $uid: User ID of the user requesting reset. int $timestamp: The current timestamp. string $hash: Login link hash. Return value \Symfony\Component\HttpFoundation\RedirectResponse Th

UserController::resetPassLogin

public UserController::resetPassLogin($uid, $timestamp, $hash) Validates user, hash, and timestamp; logs the user in if correct. Parameters int $uid: User ID of the user requesting reset. int $timestamp: The current timestamp. string $hash: Login link hash. Return value \Symfony\Component\HttpFoundation\RedirectResponse Returns a redirect to the user edit form if the information is correct. If the information is incorrect redirects to 'user.pass' route with a message for the user. Throws \Sy

UserController::userPage

public UserController::userPage() Redirects users to their profile page. This controller assumes that it is only invoked for authenticated users. This is enforced for the 'user.page' route with the '_user_is_logged_in' requirement. Return value \Symfony\Component\HttpFoundation\RedirectResponse Returns a redirect to the profile of the currently logged in user. File core/modules/user/src/Controller/UserController.php, line 256 Class UserController Controller routines for user routes. Nam

UserController::userTitle

public UserController::userTitle(UserInterface $user = NULL) Route title callback. Parameters \Drupal\user\UserInterface $user: The user account. Return value string|array The user account name as a render array or an empty string if $user is NULL. File core/modules/user/src/Controller/UserController.php, line 270 Class UserController Controller routines for user routes. Namespace Drupal\user\Controller Code public function userTitle(UserInterface $user = NULL) { return $user ? ['#

UserController::__construct

public UserController::__construct(DateFormatterInterface $date_formatter, UserStorageInterface $user_storage, UserDataInterface $user_data, LoggerInterface $logger) Constructs a UserController object. Parameters \Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter service. \Drupal\user\UserStorageInterface $user_storage: The user storage. \Drupal\user\UserDataInterface $user_data: The user data service. \Psr\Log\LoggerInterface $logger: A logger instance. File core