Drupal 8  8.0.2
UserController Class Reference
Inheritance diagram for UserController:

Public Member Functions

 __construct (DateFormatterInterface $date_formatter, UserStorageInterface $user_storage, UserDataInterface $user_data)
 resetPass ($uid, $timestamp, $hash)
 userPage ()
 userTitle (UserInterface $user=NULL)
 logout ()
 confirmCancel (UserInterface $user, $timestamp=0, $hashed_pass= '')

Static Public Member Functions

static create (ContainerInterface $container)

Protected Attributes


Detailed Description

Controller routines for user routes.

Constructor & Destructor Documentation

__construct ( DateFormatterInterface  $date_formatter,
UserStorageInterface  $user_storage,
UserDataInterface  $user_data 

Constructs a UserController object.

\Drupal\Core\Datetime\DateFormatterInterface$date_formatterThe date formatter service.
\Drupal\user\UserStorageInterface$user_storageThe user storage.
\Drupal\user\UserDataInterface$user_dataThe user data service.

Member Function Documentation

confirmCancel ( UserInterface  $user,
  $timestamp = 0,
  $hashed_pass = '' 

Confirms cancelling a user account via an email link.

\Drupal\user\UserInterface$userThe user account.
int$timestampThe timestamp.
string$hashed_passThe hashed password.
A redirect response.

References Drupal\config(), UserInterface\getLastLoginTime(), Crypt\hashEquals(), AccountInterface\id(), and t().

Here is the call graph for this function:

static create ( ContainerInterface  $container)


logout ( )

Logs the current user out.

A redirection to home page.
resetPass (   $uid,

Returns the user password reset page.

int$uidUID of user requesting reset.
int$timestampThe current timestamp.
string$hashLogin link hash.
array| The form structure or a redirect response.
\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpExceptionIf the login link is for a blocked user or invalid user ID.

References Drupal\config(), Drupal\currentUser(), Drupal\formBuilder(), Crypt\hashEquals(), t(), and Drupal\url().

Here is the call graph for this function:

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.

Returns a redirect to the profile of the currently logged in user.

References Drupal\currentUser().

Here is the call graph for this function:

userTitle ( UserInterface  $user = NULL)

Route title callback.

\Drupal\user\UserInterface$userThe user account.
string|array The user account name as a render array or an empty string if $user is NULL.

References Xss\getHtmlTagList().

Here is the call graph for this function:

The documentation for this class was generated from the following file: