Problem/Motivation

I have Drupal Version 9.5.8 and have installed this module (Version: 8.x-1.3) with PHP Version 8.0.20.

After enabling the module I checked the Checkbox viz., "Disable Request new password link" from page /admin/config/people/noreqnewpass. I also checked and confirmed the permissions, both of which i.e. "Administer No Request New Password" and "Can change your own password" are checked only for "administrator". I not only cleared the cache from admin section but also using the drush with command "drush cr". Not only that, I even rebuilt the Content permissions just to be on safer side and YET, I can still see the link "Reset your password" on User Login Block that I uncluded on one of my twig file through .theme file via hook_preprocess_node().

When I try to access the URL '/user/password' directly from browser, it for sure denies the access. So it appears that module is working okay it's just that Removing the link from login block screen is left to be done.

Am I missing anything in here ?

Steps to reproduce

NA

Proposed resolution

NA

Remaining tasks

NA

User interface changes

NA

API changes

NA

Data model changes

NA

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

sandip27 created an issue. See original summary.

shailja179’s picture

StatusFileSize
new946.53 KB

@sandip27,
I have tried 8.x-1.3 version with Drupal9 set up and its working fine after disabling setting from admin/config/people/noreqnewpass and clearing the cache.
No need of any custom code.You can check in incognito.

Attaching the screenshot. Let me know if you still have the issue.

shailja179’s picture

Status: Active » Needs review
sandip27’s picture

Title: "Reset your password" Link still Visible on User Login Block » "Reset your password" Link still Visible on Rendered User Login Block
sandip27’s picture

Status: Needs review » Active

@shailja179,
As I mentioned in Description, I am not sure about the by default out of the box behaviour of this module, but I am rendering the login block programatically in one of twig file through .theme file via hook_preprocess_node(). That's the requirement of mine to display user login block at specific page and place.

In that scenario, When some one renders the User Login Block Programatically, the link to reset the password is missed to be eliminated and still present.

shailja179’s picture

Status: Active » Needs work
shailja179’s picture

Assigned: Unassigned » shailja179
Status: Needs work » Needs review
StatusFileSize
new1.45 KB

Module is only disabling the url access. Links are still there for form block.
I have added patch to fix the issue. Please try this.
This is for Drupal9.

sandip27’s picture

Status: Needs review » Needs work
StatusFileSize
new255.67 KB

The patch worked fine for removing the items off of User Login Block. However, it removes just the Links, but wrapping <ul><li></li></ul> is still there making the looks of user login block weird.

There should be some fix that will eliminate the entire <ul></ul> structure off of login block. Check attached screenshot.

Image

shailja179’s picture

Status: Needs work » Needs review
StatusFileSize
new1.43 KB

Sorry wrong patch.Please try this one.

sandip27’s picture

Status: Needs review » Reviewed & tested by the community

That worked like a charm !

I have updated the Status to "Reviewed and Tested".

Maintainers, Please roll out this patch to merge into the module.

Thanks

shailja179’s picture

Assigned: shailja179 » Unassigned
shailja179’s picture

@Neslee Canil Pinto,
Please check this patch and merge.
Thanks

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

astonvictor’s picture

Version: 8.x-1.3 » 8.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.