USERNAME_MAX_LENGTH

Same name in other branches
  1. 7.x 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

Code

const USERNAME_MAX_LENGTH = 60;

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