New user here, so please be nice.
I'm using Milkboy's Admin Userlist MOD. Works great, but I don't like the fact that main admin can be deleted. Also can be banned.
The changes should be done in admin/admin_userlist.php. Probably around this line:
- Code: Select all
$sql = "DELETE FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete user', '', __LINE__, __FILE__, $sql);
}
I've tryed to after add this:
- Code: Select all
if ( $user_id == 2 )
{
message_die(GENERAL_ERROR, 'Can't delete main admin' );
}
But the error shows up after delete confirmation so main admin is still deleted.
I could use a hand on this, because I'm only a begginer with PHP coding, so I still have a lot to lern.
Thanks!

