vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Allow undeleteable user to modify / edit / delete themself (https://vborg.vbsupport.ru/showthread.php?t=62404)

Gary King 03-10-2004 10:00 PM

Allow undeleteable user to modify / edit / delete themself
 
Requested here: https://vborg.vbsupport.ru/showthread.php?t=62395

This hack allows whoever is in the $undeletableusers variable (users who cannot be edited/deleted) to be able to edit/delete themselves, meaning that only the protected user can modify themselves but no one else can modify/delete them.

Instructions

Open admincp/moderater.php and find
PHP Code:

            if (!in_array($userinfo['userid'], $noalter)) 

Replace with
PHP Code:

            if (!in_array($userinfo['userid'], $noalter) or $bbuserinfo['userid'] != $userinfo['userid']) 

Open admincp/user.php and find
PHP Code:

    if (in_array($userid$nodelete)) 

Replace with
PHP Code:

    if (in_array($userid$nodelete) and $bbuserinfo['userid'] != $userid

Find
PHP Code:

    if (!empty($noalter[0]) AND in_array($userid$noalter)) 

Replace with
PHP Code:

    if (!empty($noalter[0]) AND in_array($userid$noalter) and $bbuserinfo[userid] != $userid

Open admincp/usertools.php and find
PHP Code:

    if (!empty($noalter[0]) AND (in_array($sourceinfo['userid'], $noalter) OR in_array($destinfo['userid'], $noalter))) 

Replace with
PHP Code:

    if (!empty($noalter[0]) AND (in_array($sourceinfo['userid'], $noalter) OR in_array($destinfo['userid'], $noalter)) and $bbuserinfo[userid] != $sourceinfo[userid] and $bbuserinfo[userid] != $destinfo[userid]) 

Open modcp/user.php and find ALL SIX (6) instances of the following code
PHP Code:

    if (!empty($noalter[0]) AND in_array($userid$noalter)) 

Replace ALL 6 INSTANCES WITH
PHP Code:

    if (!empty($noalter[0]) AND in_array($userid$noalter) and $bbuserinfo[userid] != $userid

There, all done! :D

AN-net 03-11-2004 10:00 PM

i wanted this so bad! im like i know no one else can edit me but y can't i edit my self? thanks alot for releasing this;)

TheAnt 03-11-2004 10:15 PM

thank you *install

Gary King 03-11-2004 10:37 PM

Quote:

Originally Posted by AN-net
i wanted this so bad! im like i know no one else can edit me but y can't i edit my self? thanks alot for releasing this;)

Please click 'Install' then :)

Scrub 03-11-2004 10:40 PM

Put it in a .txt file and it'll be better. *hint hint* ;)

Gary King 03-11-2004 10:48 PM

Quote:

Originally Posted by Scrub
Put it in a .txt file and it'll be better. *hint hint* ;)

Okay done.

GoTTi 03-12-2004 04:39 AM

this should be input'd to the release of vb gold

Boofo 03-12-2004 07:08 AM

Quote:

Originally Posted by Da_GoTTi
this should be input'd to the release of vb gold

It's too dangerous to include this in vB Gold.

msimplay 03-12-2004 08:34 AM

Quote:

Originally Posted by Boofo
It's too dangerous to include this in vB Gold.

dangerous how ?

Boofo 03-12-2004 08:46 AM

Quote:

Originally Posted by msimplay
dangerous how ?

If someone hacks your account or one of your "trusted" co-admins has your account info and decides to go berserk, they can edit your password and other stats in your account, locking you out and doing who else knows what damage before you can recover. That is why the nodelete was added to vB3. There were plenty of instances of this happeneing with vB2.


All times are GMT. The time now is 08:11 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.01242 seconds
  • Memory Usage 1,754KB
  • 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
  • (10)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete