##############################################################
## MOD Title: Admin Protection
## MOD Author: TheWizard < Kamajii@TheAnimePlace.com > (Francisco Ayala) http://www.theanimeplace.com
## MOD Description: Keeps someone from de-activating or removing the admin status of the original administrator of a forum.
## MOD Version: x.x.x
##
## Installation Level: (Easy)
## Installation Time: 1 Minutes
## Files To Edit: admin/admin_ug_auth.php,
## admin/admin_users.php,
## admin/admin_user_ban.php
## language/lang_english/lang_admin.php
##
##
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## A quick fix to someone's problems.
##############################################################
## MOD History:
##
## 2006-06-25 - Version 1.0.0
## - Created today
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_ug_auth.php
#
#-----[ FIND ]------------------------------------------
#
if ( $userdata['user_id'] != $user_id)
#
#-----[ REPLACE WITH ]-------------------------------
#
if ( $userdata['user_id'] != $user_id && $user_id != 2)
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
$user_status = ( !empty($HTTP_POST_VARS['user_status']) ) ? intval( $HTTP_POST_VARS['user_status'] ) : 0;
#
#-----[ AFTER, ADD ]------------------------------------
#
#
$user_status = ( !empty($HTTP_POST_VARS['user_status']) ) ? intval( $HTTP_POST_VARS['user_status'] ) : 0;
$user_status = ( $user_id != 2 ) ? $user_status : 1;
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_user_ban.php
#
#-----[ FIND ]------------------------------------------
#
$this_userdata = get_userdata($HTTP_POST_VARS['username_fillfix'], true);
if( !$this_userdata )
{
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
#
#-----[ AFTER, ADD ]------------------------------------
#
#
if ( $this_userdata['user_id'] == 2 )
{
message_die(GENERAL_MESSAGE, $lang['No_ban_main_admin'] );
}
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['No_banned_email'] = 'No banned email addresses';
#
#-----[ AFTER, ADD ]------------------------------------
#
#
$lang['No_ban_main_admin'] = 'You cannot ban the original administrator';
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM