Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Only Superadministrators can edit undeletables Details »»
Only Superadministrators can edit undeletables
Version: 1.00, by Harley77 Harley77 is offline
Developer Last Online: Jan 2011 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-09-2005 Last Update: Never Installs: 2
Code Changes  
No support by the author.

I searched the forums and couldn't find anything quite like this, so I figured I'd share this simple little modification.

This is a VERY simple hack I implemented on my forum so that we could prevent other administrators from modifying other admins user accounts.

It works by simply bypassing the Undeleteable Check in /admincp/user.php if the currently logged in user is in the superadministrator list in /includes/config.php.

By doing this, you can put all your admins or other users in the Undeleteable catagory for account protection while still allowing them to be altered by a master administrator.

They can still update and change their profile via the UserCP, they just wont be able to modify their account via AdminCP.

Please note, I'm not a coder.. more of modifier, so I cannot guarantee that this will not have any unforseen and less than desirable side effects. If any of you know of a reason that this is a bad idea, please post. Otherwise, hopefully someone else can find this useful.


Instructions:


in /admincp/user.php
Find this:
PHP Code:
$noalter explode(','$undeletableusers);
    if (!empty(
$noalter[0]) AND in_array($userid$noalter))
    {
        
print_stop_message('user_is_protected_from_alteration_by_undeletableusers_var');
    } 
Replace with this:
PHP Code:
if (in_array($bbuserinfo['userid'], preg_split('#\s*,\s*#s'$superadministrators, -1PREG_SPLIT_NO_EMPTY)))
  {
      
//do nothing
  
}
  else
  {
  
$noalter explode(','$undeletableusers);
    if (!empty(
$noalter[0]) AND in_array($userid$noalter))
    {
        
print_stop_message('user_is_protected_from_alteration_by_undeletableusers_var');
    }
  } 

Now just open your /includes/config.php file and add the UID's of your undeletables and Superadministrators.


Thats it.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-11-2005, 12:06 AM
bigcurt's Avatar
bigcurt bigcurt is offline
 
Join Date: Nov 2004
Location: KierDarby.php
Posts: 1,009
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If I am not mistaken there is already a hack for this..not sure though..either way great hack man

~Curt
Reply With Quote
  #3  
Old 08-11-2005, 12:11 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The one you're talking about is for 3.5, isn't it?
Reply With Quote
  #4  
Old 08-11-2005, 06:11 PM
bigcurt's Avatar
bigcurt bigcurt is offline
 
Join Date: Nov 2004
Location: KierDarby.php
Posts: 1,009
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont think so..I thought there was one for 3.0.X..not sure though..you know me boofo ( I ALMOST says boobfoo :P )

~Curt
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:15 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08067 seconds
  • Memory Usage 2,235KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete