UserInterface

Provides an interface defining a user entity. Hierarchy interface \Drupal\Core\Entity\ContentEntityInterface extends \Traversable; interface \Drupal\Core\Entity\EntityChangedInterface; interface \Drupal\Core\Session\AccountInterfaceinterface \Drupal\user\UserInterface Related topics User accounts, permissions, and roles API for user accounts, access checking, roles, and permissions. File core/modules/user/src/UserInterface.php, line 14 Namespace Drupal\user Members Name Modifiers

UserInterface::activate

public UserInterface::activate() Activates the user. Return value \Drupal\user\UserInterface The called user entity. File core/modules/user/src/UserInterface.php, line 144 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code public function activate();

UserInterface::addRole

public UserInterface::addRole($rid) Add a role to a user. Parameters string $rid: The role ID to add. File core/modules/user/src/UserInterface.php, line 33 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code public function addRole($rid);

UserInterface::block

public UserInterface::block() Blocks the user. Return value \Drupal\user\UserInterface The called user entity. File core/modules/user/src/UserInterface.php, line 152 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code public function block();

UserInterface::checkExistingPassword

public UserInterface::checkExistingPassword(UserInterface $account_unchanged) Checks the existing password if set. Parameters \Drupal\user\UserInterface $account_unchanged: The unchanged user entity to compare against. Return value bool TRUE if the correct existing password was provided. See also UserInterface::setExistingPassword() File core/modules/user/src/UserInterface.php, line 185 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code publ

UserInterface::getCreatedTime

public UserInterface::getCreatedTime() Returns the creation time of the user as a UNIX timestamp. Return value int Timestamp of the creation date. File core/modules/user/src/UserInterface.php, line 90 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code public function getCreatedTime();

UserInterface::getInitialEmail

public UserInterface::getInitialEmail() Returns the email that was used when the user was registered. Return value string Initial email address of the user. File core/modules/user/src/UserInterface.php, line 160 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code public function getInitialEmail();

UserInterface::getLastLoginTime

public UserInterface::getLastLoginTime() Returns the UNIX timestamp when the user last logged in. Return value int Timestamp of the last login time. File core/modules/user/src/UserInterface.php, line 109 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code public function getLastLoginTime();

UserInterface::getPassword

public UserInterface::getPassword() Returns the hashed password. Return value string The hashed password. File core/modules/user/src/UserInterface.php, line 60 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code public function getPassword();

UserInterface::hasRole

public UserInterface::hasRole($rid) Whether a user has a certain role. Parameters string $rid: The role ID to check. Return value bool Returns TRUE if the user has the role, otherwise FALSE. File core/modules/user/src/UserInterface.php, line 25 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code public function hasRole($rid);