Code: Select all
#
#-----[ FIND ]------------------------------------------
#
redirect(appen
Tones wrote: Please re-write the login.php section.
Thecan be found on more then one locationCode: Select all
# #-----[ FIND ]------------------------------------------ # redirect(appen
and there seems to be a parse error, my html editor reports a problem
between line 78 and 90
Use the entire search line instead of just a part of it.
I'll have to find the bug now.
tk102 wrote: @morpheus2matrix:
Having this mod and your Log Actions mod work together would be a great combo.
Tones wrote: Please re-write the login.php section.
Thecan be found on more then one locationCode: Select all
# #-----[ FIND ]------------------------------------------ # redirect(appen
and there seems to be a parse error, my html editor reports a problem
between line 78 and 90
Use the entire search line instead of just a part of it.
I'll have to find the bug now.
Code: Select all
redirect(append_sid($url, true));
}
else
{
message_die(CRITICAL_ERROR, "Couldn't start session : login", "", __LINE__, __FILE__);
Code: Select all
function log_action_at_login($action, $user_ip, $user_id, $username)
{
global $db;
$topic_id=0;
$username = addslashes($username);
$time = time();
$sql = "INSERT INTO " . LOGS_TABLE . " (mode, topic_id, user_id, username, user_ip, time)
VALUES ('$action', '$topic_id', '$user_id', '$username', '$user_ip', '$time')";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into logs table', '', __LINE__, __FILE__, $sql);
}
}
Code: Select all
//
//----[ FIND ]-----
//
include($phpbb_root_path . 'common.'.$phpEx);
//
//---[ AFTER ADD ]----
//
include($phpbb_root_path . 'includes/functions_log.'.$phpEx);
//
//----[ FIND ]-----
//
$emailer->reset();
}
//
//---[ AFTER ADD ]----
//
log_action_at_login('Account blocked', $user_ip, $row['user_id'], $row['username']);
//
//----[ FIND ]-----
//
$message = $lang['Error_login'] . '<br /><br />' . sprintf($lang['Click_return_login']
//
//---[ AFTER ADD ]----
//
log_action_at_login('Login failed', $user_ip, $row['user_id'], $row['username']);
Code: Select all
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
Code: Select all
$sql=array(
'ALTER TABLE ' . USERS_TABLE . ' ADD user_passwd_change INT(11) NOT NULL',
'UPDATE ' . USERS_TABLE . ' SET user_passwd_change=user_regdate',
'UPDATE ' . USERS_TABLE . ' SET user_passwd_change=' .time(). ' WHERE user_level='.ADMIN,
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES ("max_password_age", "730")',
'ALTER TABLE ' . USERS_TABLE . ' ADD user_badlogin SMALLINT(5) NOT NULL',
'ALTER TABLE ' . USERS_TABLE . ' ADD user_blocktime INT(11) NOT NULL',
'ALTER TABLE ' . USERS_TABLE . ' ADD user_block_by VARCHAR (8)',
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES ("block_time", "15")',
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES ("max_login_error", "3")',
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES ("min_password_len", "6")',
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES ("force_complex_password", "0")',
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES ("password_not_login", "1")'
);
Code: Select all
$sql=array(
'ALTER TABLE ' . USERS_TABLE . ' ADD user_passwd_change INT DEFAULT 0 NOT NULL',
'UPDATE ' . USERS_TABLE . ' SET user_passwd_change=user_regdate',
'UPDATE ' . USERS_TABLE . ' SET user_passwd_change=' .time(). ' WHERE user_level='.ADMIN,
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES (\'max_password_age\', \'730\')',
'ALTER TABLE ' . USERS_TABLE . ' ADD user_badlogin SMALLINT DEFAULT 0 NOT NULL',
'ALTER TABLE ' . USERS_TABLE . ' ADD user_blocktime INT DEFAULT 0 NOT NULL',
'ALTER TABLE ' . USERS_TABLE . ' ADD user_block_by VARCHAR (8)',
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES (\'block_time\', \'15\')',
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES (\'max_login_error\', \'3\')',
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES (\'min_password_len\', \'6\')',
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES (\'force_complex_password\', \'0\')',
'INSERT INTO '. CONFIG_TABLE . ' (config_name, config_value) VALUES (\'password_not_login\', \'1\')'
);