UserData::delete

public UserData::delete($module = NULL, $uid = NULL, $name = NULL) Deletes data stored for a user account. Parameters string|array $module: (optional) The name of the module the data is associated with. Can also be an array to delete the data of multiple modules. int|array $uid: (optional) The user account ID the data is associated with. If omitted, all data for $module is deleted. Can also be an array of IDs to delete the data of multiple user accounts. string $name: (optional) The name of th

UserData::set

public UserData::set($module, $uid, $name, $value) Stores data for a user account. Parameters string $module: The name of the module the data is associated with. int $uid: The user account ID the data is associated with. string $name: The name of the data key. mixed $value: The value to store. Non-scalar values are serialized automatically. Overrides UserDataInterface::set File core/modules/user/src/UserData.php, line 80 Class UserData Defines the user data service. Namespace Drupal\us

UserData::get

public UserData::get($module, $uid = NULL, $name = NULL) Returns data stored for a user account. Parameters string $module: The name of the module the data is associated with. int $uid: (optional) The user account ID the data is associated with. string $name: (optional) The name of the data key. Return value mixed|array The requested user account data, depending on the arguments passed: For $module, $name, and $uid, the stored value is returned, or NULL if no value was found. For $module and

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

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::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::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::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::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