Problem/Motivation

change_pwd_page_form_alter() hides the password fields of the password reset form.
The password reset form is actually the user_edit form with a specific form state.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mkalkbrenner created an issue. See original summary.

mkalkbrenner’s picture

Status: Active » Needs review
StatusFileSize
new2.88 KB
deepesh151086’s picture

StatusFileSize
new1.91 KB

Hi @mkalkbrenner , this will break with password policy module. Attaching a new patch which resoves the problem.

keshav.k made their first commit to this issue’s fork.

keshavv’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new119.36 KB

Patch #3 Failed to apply because there are some latest changes in the file.
I have removed the Change Password tab when the user resets the password.
The issue is also fixed. Please review the MR and merge.

Thank you.

Screenshot

thomasmurphy’s picture

Status: Reviewed & tested by the community » Needs work

I tried the forked version from #6 but it didn't fix the issue for me. This wasn't a clean install, though, it's part of an existing application which may complicate things. It's still worth someone testing with only core and this modules and its dependencies.

The patch from #1 applied to 2.0.0 but also didn't solve the issue.

keshavv’s picture

Status: Needs work » Needs review

When the user redirects to the Change password page from the email's One-time reset link.
On that page, Fields were missing to reset passwords, Because this module will create a separate tab to update the password.

When a user clicks on Update password tab, The URL changed and the token for resetting the password is removed from url. So the user is not able to reset the password.

In the given MR I have moved the update password fields to the One-time login, edit profile page, So that the user can update the password on the same page, and it works for me.

Please review.

c_archer’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new96.65 KB

Tested the MR and it does add the password fields to the user edit page. Would it not be better to redirect the user to the user/change-password page?

Screenshot

cobenash’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new591 bytes

Hey folks,

I have the same issue, and I checked the code on the module. I think the problem occurred because the path on the alter routes doesn't trigger the route change_pwd_page.reset successfully.

change_pwd_page.reset:
  path: '/user/reset/{uid}/{timestamp}/{hash}/new/login'
  defaults:
    _controller: '\Drupal\change_pwd_page\Controller\ChangePwdPageController::resetPass'
    _title: 'Reset password'
  requirements:
    _access: 'TRUE'
  options:
    _maintenance_access: TRUE
    no_cache: TRUE

Therefore, I modified the path, which seems to work as expected.

jibus’s picture

patch #10 works for me.

User gets redirect to the separate password when resetting its password.

fox mulder’s picture

#10 works for us
core: 10.4.6
change_pwd_page: 2.0.0
PHP 8.1.32

bluegeek9 made their first commit to this issue’s fork.

bluegeek9 changed the visibility of the branch 8.x-1.x to hidden.

mkalkbrenner changed the visibility of the branch 3372510-module-breaks-cores to hidden.

c_archer’s picture

Status: Needs review » Needs work

Latest changes want apply

 Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/change_pwd_page/-/merge_requests/12.diff

In Patches.php line 331:
                                                                                                              
  Cannot apply patch password (https://git.drupalcode.org/project/change_pwd_page/-/merge_requests/12.diff)!  
                                                                                                              
mkalkbrenner’s picture

Status: Needs work » Needs review
StatusFileSize
new2.68 KB

We faced the same issue with the patch yesterday. Take a look at the patch file. If it contains unrelated stuff, you ran into the same gitlab issue. I think it is caused by the fact that 2.0.x and 2.x is involved which seems to confuse gitlabs patch output.
Checking out the branch and creating the patch locally works.

bluegeek9’s picture

Version: 2.x-dev » 2.0.x-dev