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

 $dateFormatter
 
 $userStorage
 
 $userData
 

Detailed Description

Controller routines for user routes.

Constructor & Destructor Documentation

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

Constructs a UserController object.

Parameters
\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.

Parameters
\Drupal\user\UserInterface$userThe user account.
int$timestampThe timestamp.
string$hashed_passThe hashed password.
Returns
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)
static

{}

logout ( )

Logs the current user out.

Returns
A redirection to home page.
resetPass (   $uid,
  $timestamp,
  $hash 
)

Returns the user password reset page.

Parameters
int$uidUID of user requesting reset.
int$timestampThe current timestamp.
string$hashLogin link hash.
Returns
array| The form structure or a redirect response.
Exceptions
\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
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.

Parameters
\Drupal\user\UserInterface$userThe user account.
Returns
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: