UserInterface::USERNAME_MAX_LENGTH

Same name in other branches
  1. 9 core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::USERNAME_MAX_LENGTH
  2. 10 core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::USERNAME_MAX_LENGTH
  3. 11.x core/modules/user/src/UserInterface.php \Drupal\user\UserInterface::USERNAME_MAX_LENGTH

Maximum length of username text field.

Keep this under 191 characters so we can use a unique constraint in MySQL.

File

core/modules/user/src/UserInterface.php, line 21

Class

UserInterface
Provides an interface defining a user entity.

Namespace

Drupal\user

Code

const USERNAME_MAX_LENGTH = 60;

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