vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   How to remove password field in User Profile (https://vborg.vbsupport.ru/showthread.php?t=274826)

Richard E 11-29-2011 09:56 PM

How to remove password field in User Profile
 
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:

Code:

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:

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


All times are GMT. The time now is 11:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01024 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete