Back to vBulletin 4.x Add-ons

Normal Admin Can't Delete User
Mod Version: 1.20, by TilkiBey

vB Version: 4.0.x Rating: (4 votes - 5.00 average) Installs: 19
Released: 18 Aug 2010 Last Update: Never Downloads: 0
Not Supported Code Changes  

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/showthread.php/2285-Adminlerinizin-%C3%9Cye-Silmesini-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

Download

No files for download.

Addons

Screenshots

Click image for larger version
Name:	ss.jpg
Views:	248
Size:	108.4 KB
ID:	122358  


vblts.ru supports vBulletin®, 2022-2024