The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Lock Members from editing profile
This is another hack on vb2 that i'd like to see here, also would it be possible to lock them out of editing their options, but still let them in the User CP? Preferably a hack that'd allow for Lock/Unlock. either All are locked or all are unlocked, so i guess they'd be controlled by one click.
If confused i'll do my best to clarify. Thank you. dakotausa |
#2
|
||||
|
||||
This has been a default usergroup permission since vB2.
Usergroup Manager -> Select a usergroup -> 'Can Edit Own Profile' -> No. |
#3
|
|||
|
|||
I understand that, but would like to make it imposed on a single person, not a whole usergroup. I'd like to stay away from creating a new usergroup.
|
#4
|
|||
|
|||
bump
|
#5
|
||||
|
||||
Well since you're a fellow F-Body owner & car enthusiast I'll help ya out.
Run this query via phpmyadmin: ALTER TABLE user ADD pban smallint(5) unsigned DEFAULT 1 NOT NULL In admincp/user.php find: Code:
{ print_profilefield_row($profilefield, $userfield); } Code:
print_yes_no_row($vbphrase['can_edit_profile'], 'pban',$user[pban]); Code:
if ($_POST['do'] == 'update') { globalize($_POST, array( 'password', 'user', 'membergroup', 'modifyavatar', 'birthday', 'signature', 'modifyprofilepic', 'joindate', 'lastvisit', 'lastactivity', 'lastpost', 'options', 'referrer', 'threaddisplaymode' => INT )); Code:
if ($_POST['do'] == 'update') { globalize($_POST, array( 'password', 'user', 'membergroup', 'modifyavatar', 'birthday', 'signature', 'modifyprofilepic', 'joindate', 'lastvisit', 'lastactivity', 'lastpost', 'options', 'referrer', 'pban', 'threaddisplaymode' => INT )); Code:
$DB_site->query(" INSERT INTO " . TABLE_PREFIX . "usertextfield (userid, signature) VALUES ($userid, '" . addslashes($signature) . "') "); } Code:
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET pban=$pban WHERE userid=$userid"); Code:
if ($_REQUEST['do'] == 'editprofile') { Code:
if ($bbuserinfo[pban]==0) { print_no_permission(); } Code:
if ($_REQUEST['do'] == 'editoptions') { Code:
if ($bbuserinfo[pban]==0) { print_no_permission(); } Code:
// ############################################################################ // ALL FUNCTIONS BELOW HERE REQUIRE 'canmodifyprofile' PERMISSION, SO CHECK IT Varname: can_edit_profile Text: Can edit Profile? Then to lock a member from editing his profile you would just click user options and set can edit profile to "no". |
#6
|
|||
|
|||
Thank you, thank you, thank you. I've been looking for something like this, but the closest thing I found was a hack that changed way too many things I didn't need changed.
|
#7
|
||||
|
||||
I have alos added to this to make a link in the memberinfo for locking and unlocking each user's profile. And also added the safety check for the Super Admin user so no one can change his (or her) profile. The link only shows up to Admins.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|