vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 5.x Products & Extensions (https://vborg.vbsupport.ru/forumdisplay.php?f=258)
-   -   Administrative and Maintenance Tools - Normal Admin Can't Delete User vB5 (https://vborg.vbsupport.ru/showthread.php?t=328721)

yilmaz 04-17-2021 09:00 PM

Normal Admin Can't Delete User vB5
 
1 Attachment(s)
Tested in vbulletin version 5.6.4 works fine

Description:
====================================
Superadmins (from "core/includes/config.php" file) can delete users
but, normal admins can NOT delete users

How to install :
====================================
Follow install instructions

1-) download and open "core/admincp/user.php" file

2-a) find

PHP Code:

print_cp_header($vbphrase['user_manager'], ''$extraheader); 

2-b) replace with

PHP Code:

if ($_REQUEST['do'] == 'remove' AND !in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s'$vb5_config['SpecialUsers']['superadmins'], -1PREG_SPLIT_NO_EMPTY))){
    
print_cp_header('Access Denied');
}
else{
    
print_cp_header($vbphrase['user_manager'], ''$extraheader);


3-a) find
PHP Code:

if ($_REQUEST['do'] == 'remove')


3-b) add BELOW

PHP Code:

if (!in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s'$vb5_config['SpecialUsers']['superadmins'], -1PREG_SPLIT_NO_EMPTY)))
{
    
print_table_start();
    
print_table_header('Access Denied');
    echo 
"<td class=\"alt1\" nowrap=\"nowrap\" align=\"center\">You Have No Permission For This Process</td>";
    
print_table_footer(2''''0);
}
else{ 

4-a) find

PHP Code:

// ###################### Start Kill ####################### 

4-b) add ABOVE

PHP Code:



5-) save and upload to ur admincp directory. that's all

Notice: u can edit sentences manuel which re highlighted at ss

How to uninstall:
========================================
It is sufficient to overwrite the "core/admincp/user.php" file on your server with its original.

-----
Mark as installed = get support.

for vB4

danielmorashov 04-19-2021 10:59 AM

thank you very much
how i do the memory usage?

darkboy245 04-20-2021 07:03 PM

thank you very much, it would be great if u can do the same for editing usergroups, like normal admin cant edit the owner's usergroup but he can edit the rest.


All times are GMT. The time now is 01:58 AM.

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.01434 seconds
  • Memory Usage 1,729KB
  • 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
  • (6)bbcode_php_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