@@ -178,7 +179,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form['admin_account']['account']['name']=[
'#type'=>'textfield',
'#title'=>$this->t('Username'),
'#maxlength'=>USERNAME_MAX_LENGTH,
'#maxlength'=>UserInterface::USERNAME_MAX_LENGTH,
'#description'=>$this->t("Several special characters are allowed, including space, period (.), hyphen (-), apostrophe ('), underscore (_), and the @ sign."),
Changes for core/modules/user/src/AccountForm.php: 2 added lines, 2 removed lines.
Original line number
Diff line number
Diff line
@@ -104,7 +104,7 @@ public function form(array $form, FormStateInterface $form_state) {
$form['account']['name']=[
'#type'=>'textfield',
'#title'=>$this->t('Username'),
'#maxlength'=>USERNAME_MAX_LENGTH,
'#maxlength'=>UserInterface::USERNAME_MAX_LENGTH,
'#description'=>$this->t("Several special characters are allowed, including space, period (.), hyphen (-), apostrophe ('), underscore (_), and the @ sign."),
'#required'=>TRUE,
'#attributes'=>[
@@ -184,7 +184,7 @@ public function form(array $form, FormStateInterface $form_state) {
'#description'=>$this->t('Edit the welcome email messages sent to new members upon registering, when administrative approval is required.').' '.$email_token_help,
'#group'=>'email',
];
@@ -243,7 +243,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#description'=>$this->t('Edit the email notifying the site administrator that there are new members awaiting administrative approval.').' '.$email_token_help,
'#group'=>'email',
];
@@ -263,7 +263,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$form['email_no_approval_required']=[
'#type'=>'details',
'#title'=>$this->t('Welcome (no approval required)'),
'#description'=>$this->t('Edit the welcome email messages sent to new members upon registering, when no administrator approval is required.').' '.$email_token_help,