By xjm on
I would like to change the "request new password" tab at user/login. (My users authenticate with an external LDAP server, so the "request new password tab" is confusing and inapplicable.)
Any suggestion on how to do this?
I would like to change the "request new password" tab at user/login. (My users authenticate with an external LDAP server, so the "request new password tab" is confusing and inapplicable.)
Any suggestion on how to do this?
Comments
You can create a custom
You can create a custom module that overrides the page at user/password and display a node or something else instead. The Password Reset module does.
That's the approach I'd take. DesignWork's post below is good one and doesn't require overriding whole functions in user.module.
override it with your template.php
Hi xjm,
I would override the tab in your template.php
Warm regards from cologne
Dirk
And then in your function _phptemplate_variables($hook, $vars = array()) { you search the hook user and put this in it:
This is what I ended up
This is what I ended up doing, thanks! (Unfortunately none of the modules suggested in this thread seemed to do the trick).
I modified the removetab function a little, as follows:
I made the search for the tab label case-insensitive and set it to only display tabs if there was more than one. In retrospect I should have checked whether the only tab was indeed an active tab before hiding it.
For anyone else who is trying to do this, another good idea is using the path access module to restrict access to
user/password. This doesn't hide the tab by itself (despite that I seem to remember it doing so in 4.7), but it will prevent users from resetting their password and "unsynching" their drupal acct from the LDAP one.Need help
I want to hide a tab in my user-profile edit page.
I did exactly as shown here but not getting ti hide. Please help me as I am not at all comfortable with php.
This is what I did
1. Put the code below in my template.php file.
2. then in the template.php file itself, I placed this
in the function
function _phptemplate_variables($hook, $vars)
But nothing is happening, please tell me what am I doing wrong?
Thanks & Regards
a possibility
i have been told that this functionality, which used to be in ldap_integration, was taken out due to duplication of those functions with the user protect module. have not tried it myself, though.
edit: maybe not. hrmpp! i kinda need this functionality. it was in ldap_integration v5.1.2...
Interesting...
First, I tried this module: Sympal Password Hijack which as far as I can tell does nothing. I had to create an info file for it so I could activate it, but then it did nothing - no settings, nothing.
I'm getting some success by using a combination of:
http://drupal.org/node/115159#comment-196079 and http://drupal.org/node/180295#comment-276944
I created my own module:
And the info file:
The only drawback so far is that the "request new password" tab still appears at "/user". I'll try implementing this thread's fix to fix it (EDIT: not working so far).
Maybe just removing it from the login block will be enough...
Exceptionally strange...
I saw in another thread that http://drupal.org/project/password-reset would do what I wanted.
I uninstalled my custom module above, installed password reset, found it didn't do what I wanted, uninstalled it (had to manually remove the database tables, sigh), and re-installed my custom module.
Now the Request New Password tab is gone when I go to /user and /user/login
Wierd!
EDIT: Just re-tested and uninstalled and reinstalled my module again and I'm still not seeing the tab...I'm going to try this process on a fresh install when I get home from work and see if it really works.
OK, the post above seems to work.
I just did a fresh install at home (Drupal 5.3). First thing I did was set it so that only administrators can add users (gets rid of the "Create an account" link/tab), then I created the custom module pasted above (named remove_password_request), which completely got rid of the request new password link and tab - and going to user/password results in a page not found error!
Don't think anything else is missing.
Not sure I completely understand how the code above works (new to Drupal), but it seems to.
This worked on 5.3 but not now on 5.5
I upgraded my site to 5.5 and now this custom module doesn't work. Is anyone else having this problem, or is it just something wrong with my setup? I get no errors. It just doesn't work...:(
Removing all entry points for user/password
Beyond just removing the tab, you also want to remove all entry points into user/password. Error message on login form includes a link ("have you forgotten your password?). Also a user could enter directly the user/password path. The "No Request new password" module should help with those (http://drupal.org/project/noreqnewpass).
thanks
Thanks for the link... this module didn't exist when I originally looked into this issue, so I did a lot of theming to get rid of the various password resetting links. I'll test the module when I get the chance!
Good for OpenID too
Nice suggestion, this worked like a champ ... and it has an option for disabling a user's ability to change their password. Perfect!
I'm using OpenID, so I don't want users changing their password on the Drupal-based system.