It would be a great addition to the 403 login form, that the user could ask for their password.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

littledynamo’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
FileSize
5.77 KB
39.31 KB

I needed this functionality also, so have created a patch. The 403 login form pulls from user_login function, which doesn't include the forgot password or create user links (haven't managed to figure out why. The tabs display ok in /user but not during a 403, if anybody has any insight into this then please let me know!). The patch creates an option in the settings page which allows you to include or exclude the forgot password links. If forgot password link option is selected then the code will pull the login form from user_login_block function as oppose to user_login.

Here is an image of the settings (the checkbox is disabled if 'Present login form on access denied (403) is disabled) :

Logintoboggan settings

Here is the patch:

logintoboggan-403passwordlink-1823764-1.patch

This is tested and working on Drupal 7.21

littledynamo’s picture

Version: 7.x-1.x-dev » 7.x-1.3
Status: Active » Needs review

I created this patch against 7.x-1.3 because the version control page didn't have an option for 7.x-1.x-dev release. The release page also mentioned that the dev release tracks 7.x-1.3

sjpagan’s picture

Issue summary: View changes

Hi , i applied your patch, i see the option but in front end i don't see the tab. how can i resolve it ?

m.stenta’s picture

Thanks @littledynamo for the original patch! Just what I needed.

I cleaned it up a bit and rerolled it against the latest 7.x-1.x branch. Please review.

m.stenta’s picture

One more small update: delete the new variable in hook_uninstall().

On a related note, I just posted this issue: #2619962: Update hook_uninstall()

forestmars’s picture

Status: Needs review » Reviewed & tested by the community
stevecowie’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

I can't reproduce the problem. Current behaviour with the standard login form is to show tabs for request password and register (see attached screenshot). If the unified form is used there is a link in the form (see second screenshot). I think what's happened is that a separate issue that provides for redirection of user on 403 to the standard login page fixes this. Will mark as postponed in case I haven't understood this properly.

m.stenta’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

Current behaviour with the standard login form is to show tabs for request password and register

@stevecowie: this is only true if the visitor is on the /user* path.

But LoginToboggan also has an option for showing the login form on any 403 page. The tabs do not show in that case. As @littledynamo said in #1:

The tabs display ok in /user but not during a 403