You are here

constant USERNAME_MAX_LENGTH in Drupal 8

Same name and namespace in other branches
  1. 5 modules/user/user.module \USERNAME_MAX_LENGTH
  2. 6 modules/user/user.module \USERNAME_MAX_LENGTH
  3. 7 modules/user/user.module \USERNAME_MAX_LENGTH

Maximum length of username text field.

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

Deprecated

in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\user\UserInterface::USERNAME_MAX_LENGTH instead.

See also

https://www.drupal.org/node/2831620

File

core/modules/user/user.module, line 39
Enables the user registration and login system.

Code

const USERNAME_MAX_LENGTH = 60;