Skip to content
Snippets Groups Projects
Unverified Commit 0b78493d authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2855328 by danflanagan8, sourabh.singhal, Pancho, aarti zikre,...

Issue #2855328 by danflanagan8, sourabh.singhal, Pancho, aarti zikre, asad_ahmed, priscarabelli, anushrikumari, ashwinparmar, vikashsoni, cilefen, ideaseed, Archana.Phatangare, quietone, finex, alexpott, catch, smustgrave, sugaroverflow: Password and confirm password should be mandatory fields while setting up password using one time link following by email
parent bc8a19c8
No related branches found
No related tags found
11 merge requests!11197Issue #3506427 by eduardo morales alberti: Remove responsive_image.ajax from hook,!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!10786Issue #3490579 by shalini_jha, mstrelan: Add void return to all views...,!10210Issue #3487907: Drupal.displace() use getComputedStyle() for hidden chk.,!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!2062Issue #3246454: Add weekly granularity to views date sort,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation
Pipeline #343256 passed with warnings
Pipeline: drupal

#343295

    Pipeline: drupal

    #343277

      Pipeline: drupal

      #343260

        ...@@ -157,9 +157,12 @@ public function form(array $form, FormStateInterface $form_state) { ...@@ -157,9 +157,12 @@ public function form(array $form, FormStateInterface $form_state) {
        ]; ];
        $form_state->set('user', $account); $form_state->set('user', $account);
        // The user may only change their own password without their current // If logged in via a one-time login link entering a new password is
        // password if they logged in via a one-time login link. // required and the user does not need to enter their current password.
        if (!$form_state->get('user_pass_reset')) { if ($form_state->get('user_pass_reset')) {
        $form['account']['pass']['#required'] = TRUE;
        }
        else {
        $form['account']['current_pass']['#description'] = $this->t('Required if you want to change the <em>Email address</em> or the <em>Password</em> field below. <a href=":request_new_url" title="Send password reset instructions via email.">Reset your password</a>.', [ $form['account']['current_pass']['#description'] = $this->t('Required if you want to change the <em>Email address</em> or the <em>Password</em> field below. <a href=":request_new_url" title="Send password reset instructions via email.">Reset your password</a>.', [
        ':request_new_url' => Url::fromRoute('user.pass')->toString(), ':request_new_url' => Url::fromRoute('user.pass')->toString(),
        ]); ]);
        ......
        ...@@ -138,6 +138,10 @@ public function testUserPasswordReset(): void { ...@@ -138,6 +138,10 @@ public function testUserPasswordReset(): void {
        $this->assertSession()->linkExists('Log out'); $this->assertSession()->linkExists('Log out');
        $this->assertSession()->titleEquals($this->account->getAccountName() . ' | Drupal'); $this->assertSession()->titleEquals($this->account->getAccountName() . ' | Drupal');
        // Try to save without entering password.
        $this->submitForm([], 'Save');
        $this->assertSession()->pageTextContains('Password field is required.');
        // Change the forgotten password. // Change the forgotten password.
        $password = \Drupal::service('password_generator')->generate(); $password = \Drupal::service('password_generator')->generate();
        $edit = ['pass[pass1]' => $password, 'pass[pass2]' => $password]; $edit = ['pass[pass1]' => $password, 'pass[pass2]' => $password];
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment