public User::setUsername($username)
Sets the username of this account.
Parameters
string $username: The new user name.
Return value
\Drupal\user\UserInterface The called user entity.
Overrides UserInterface::setUsername
File
- core/modules/user/src/Entity/User.php, line 382
Class
- User
- Defines the user entity class.
Namespace
Drupal\user\Entity
Code
public function setUsername($username) { $this->set('name', $username); return $this; }
Please login to continue.