Commit f8d961ec authored by alexpott's avatar alexpott
Browse files

Issue #2323921 by Michael Hodge Jr | jhodgdon: Fixed Add user page...

Issue #2323921 by Michael Hodge Jr | jhodgdon: Fixed Add user page (admin/people/create) remembers values and should not.
parent a31b5ea1
......@@ -47,7 +47,12 @@ public function form(array $form, FormStateInterface $form_state) {
$form['#attached']['library'][] = 'core/drupal.form';
$form['#attributes']['data-user-info-from-browser'] = TRUE;
// For non-admin users, populate the form fields using data from the
// browser.
if (!$admin) {
$form['#attributes']['data-user-info-from-browser'] = TRUE;
// Because the user status has security implications, users are blocked by
// default when created programmatically and need to be actively activated
......@@ -73,6 +73,9 @@ protected function testUserAdd() {
$this->assertFieldbyId('edit-status-1', 1, 'The user status option Active exists.', 'User login');
$this->assertFieldByXPath('//input[@type="radio" and @id="edit-status-1" and @checked="checked"]', NULL, 'Default setting for user status is active.');
// Test that browser autocomplete behavior does not occur.
$this->assertNoRaw('data-user-info-from-browser', 'Ensure form attribute, data-user-info-from-browser, does not exist.');
// Test that the password strength indicator displays.
$config = \Drupal::config('user.settings');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment