No Main Admin Deletion in Admin Userlist

Support for phpBB mods/hacks.

Moderator: Moderators

No Main Admin Deletion in Admin Userlist

Postby SylverCheetah53 on Fri Mar 06, 2009 1:07 pm

Hy!

New user here, so please be nice. :lol:
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. :o

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! :wink:
My Forum || My Blog || My MODs
Free your mind!
User avatar
SylverCheetah53
Registered User
Registered User
 
Posts: 4
Joined: Fri Mar 06, 2009 12:50 pm
Location: Milky Way

Return to phpBB Mods

Who is online

Users browsing this forum: No registered users and 1 guest