function UserInterface::setUsername
Same name in other branches
- 9 core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::setUsername()
- 8.9.x core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::setUsername()
- 11.x core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::setUsername()
Sets the username of this account.
Parameters
string $username: The new user name.
Return value
$this The called user entity.
1 method overrides UserInterface::setUsername()
- User::setUsername in core/
modules/ user/ src/ Entity/ User.php - Sets the username of this account.
File
-
core/
modules/ user/ src/ UserInterface.php, line 96
Class
- UserInterface
- Provides an interface defining a user entity.
Namespace
Drupal\userCode
public function setUsername($username);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.