You are here

public function UserInterface::setUsername in Drupal 9

Same name and namespace in other branches
  1. 8 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);