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

The database connection to use. Type: \Drupal\Core\Database\Connection File core/modules/user/src/UserData.php, line 17 Class UserData Defines the user data service. Namespace Drupal\user Code protected $connection;

UserData

Defines the user data service. Hierarchy class \Drupal\user\UserData implements UserDataInterface File core/modules/user/src/UserData.php, line 10 Namespace Drupal\user Members Name Modifiers Type Description UserData::$connection protected property The database connection to use. UserData::delete public function Deletes data stored for a user account. Overrides UserDataInterface::delete UserData::get public function Returns data stored for a user account

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