vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Normal Admin Can't Delete User (https://vborg.vbsupport.ru/showthread.php?t=248876)

TilkiBey 08-17-2010 10:00 PM

Normal Admin Can't Delete User
 
1 Attachment(s)
at 1st, i am sorry if i opened this thread to wrong category
at 2nd, i am sorry bout my English =)

at my forum, an admin deleted a user account without our permission
after deletion, there are a lot of db errors
so, i ve to find a solve for this problem and i found =)

Superadmins (from config.php file) can delete users
but, normal admins can NOT delete users

..::Upgrade Instructions::..
1-) Download new user.php file from ur license account
2-) Follow install instructions

..::Install Instructions::..
1-) download and open admincp/user.php file

2-a) find
PHP Code:

print_cp_header($vbphrase['user_manager']); 

2-b) replace with
PHP Code:

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


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'$vbulletin->config['SpecialUsers']['superadministrators'], -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


Turkish Support ~ T?rk?e Destek
http://www.vbulletin-turko.com/showt...ini-Engelleyin

regards...

Known Bugs
White Page Problem --> Fixed at version 1.10

Version History
1.00
1.10 --> White Page is Fixed
1.20 --> Changed Scene, Screenshot added

hakan68 08-20-2010 07:20 PM

Eline Sağlık Tilkißey
Thx man (:

Boofo 08-20-2010 07:31 PM

Just turn off being able to edit users in the admin permissions for each admin.

Videx 08-21-2010 01:47 AM

Quote:

Originally Posted by Boofo (Post 2087014)
Just turn off being able to edit users in the admin permissions for each admin.

I dunno. I thought of that too, but then I looked and the best I could find was this (vb 406), which doesn't match the functionality at all. Maybe I'm just missing the "Can edit users" option?
Quote:

Can Administer Users This setting determines whether an admin will be able to access the Users, Usergroups, User Infractions, User Titles, User Ranks, User Reputations,User Profile Fields and Paid Subscriptions areas of the Admin CP.

Boofo 08-21-2010 02:10 AM

"Admin CP -> Usergroups -> Administrator Permissions" will list your Admins. Then just go to "Edit Permissions" of the Admins you want to edit and it is all in there.

Can Administer Users = Can Edit Users

If they can't edit users they can't delete them either.

Videx 08-21-2010 02:23 AM

Quote:

Originally Posted by Boofo (Post 2087176)
If they can't edit users they can't delete them either.

True, but then neither can they do a dozen other things pertaining to users. Presumably this mod is intended to simply prevent an admin from deleting a user. But they can still administer all those other user functions.

TilkiBey 08-21-2010 07:33 AM

Quote:

Originally Posted by Boofo (Post 2087014)
Just turn off being able to edit users in the admin permissions for each admin.

if u turn off this option, that admin wont edit user profile
cannot ban user, cannot change users' usergroup... etc...

if u wanna that ur admin has permission edit users but has NO permission for delete user accounts
there is no option at vb default settings

Dr.osamA 08-22-2010 04:50 PM

thanxx bro

installed

5 stars

WhiskeyOSS 08-22-2010 05:43 PM

We only allow Two admins in the admin side of the cp the rest of them only have access to the mod panel ... to many finger in the admincp spell a whole heap of trouble for the senior admins..

atmaca 08-23-2010 04:59 PM

Thanks TilkiBey useful modification.


All times are GMT. The time now is 11:44 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.01036 seconds
  • Memory Usage 1,755KB
  • 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
  • (4)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