PDA

View Full Version : How to remove password field in User Profile


Richard E
11-29-2011, 09:56 PM
I use http://www.DigitalAccessPass.com (DAP) for shopping cart, affiliate, and autoresponder for my vBulletin site.

DAP is integrated with vBulletin so users login via the DAP login screen (inside WordPress) which automatically logs them into vBulletin 4.1.6.

I need to prevent members from changing their passwords inside vBulletin to keep them in sync with DAP (which handles credit card billing).

So for user type=PAID, they can't have the option to change passwords on their Profile screens.
For administrators, they can change passwords because they'll know better...this will also allow backdoor fixes, if necessary.

Thanks,
Richard

kh99
11-29-2011, 10:23 PM
You could create a phrase of type "Error Messages", maybe use a Varname like nopwchange and this text:

You can't change your password here. Do it <a href="{1}">here</a> instead!


Then create a new plugin using hook profile_start with this code:

if ($_REQUEST['do'] == 'editpassword' OR $_REQUEST['do'] == 'updatepassword')
{
eval(standard_error(fetch_error('nopwchange', 'www.someurl.com/changepassword')));
}


Of course you'd change the url to the one where they can change their password. Or if you want you can take that part out of the phrase and just tell them they can't do it.

Richard E
11-30-2011, 05:35 AM
Thanks Kevin. This looks like it will do the trick.
Can you point me to which php file I'd edit to test this out?

Richard