The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hide Email and Password change
Hi all, I'm looking for a way to hide/ disable the change email and password button from just one user. I'd like to use this account as a kind of test account and I don't want the guests to be able to change the email and password of the account.
I've tried inserting a conditional in the USERCP_SHELL template here: <if condition="$bbuserinfo['userid'] != bob"> <tr> <td class="$navclass[password]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editpassword">$vbphrase[edit_email_and_password]</a></td> </tr> </if> But that doesn't seem to work. When I login as userid Bob, I'm still able to change the email and password. Any other ideas? Many thanks in advance... |
#2
|
||||
|
||||
Try:
Code:
<if condition="!$bbuserinfo[userid] == 1"> <tr><td class="$navclass[password]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editpassword">$vbphrase[edit_email_and_password]</a></td></tr> </if> Where "1" is change the user ID to that who you do not want to see that code. For multiple users try: Code:
<if condition="!in_array($bbuserinfo[userid], array(1,2,3))"> <tr><td class="$navclass[password]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editpassword">$vbphrase[edit_email_and_password]</a></td></tr> </if> When you add users make sure to add a comma after the number. Good luck. --------------- Added 16 Jul 2009 at 09:48 --------------- BUT... I'd like to add that the user can still change the password by using password recovery or if they know the URL of the e-mail and password edit. Instead, I'd edit /forum/includes/config.php and find the codes: Code:
// ****** UNDELETABLE / UNALTERABLE USERS ****** // The users specified here will not be deletable or alterable from the control panel by any users. // To specify more than one user, separate userids with commas. $config['SpecialUsers']['undeletableusers'] = '1,2,3'; Just as you do with conditionals, add the user ID who you do not want to be able to edit anything in the Control Panel. At the same time I'd also include any user who has access to the Admin CP. |
#3
|
|||
|
|||
It worked, thank you so much!
|
#4
|
||||
|
||||
Cool.
|
#5
|
|||
|
|||
Hello.
I was wondering how to achieve the same but not allowing anyone to change their password and email except the admin. Thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|