function UserInterface::setUsername

Same name and namespace in other branches
  1. 8.9.x core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::setUsername()
  2. 10 core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::setUsername()
  3. 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 89

Class

UserInterface
Provides an interface defining a user entity.

Namespace

Drupal\user

Code

public function setUsername($username);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.