mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 16:52:16 +09:00
Issue 1816 , Supplementation revision not to login failure every time the member sign in.
- Administrator can set, to use the function or not. - A member will not get 'Sign in Failure Report' every time. - The reports would be send when the number of failures is over the limit of the login blocking setting. - The 'Sign in Failure Report mail' will be send with 'Administrator mail address', not with the member's mail address, to the member's mail address. git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11600 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
79095100b7
commit
2275c779f1
4 changed files with 62 additions and 37 deletions
|
|
@ -355,19 +355,20 @@
|
|||
function recordLoginError($error = 0, $message = 'success')
|
||||
{
|
||||
if($error == 0) return new Object($error, $message);
|
||||
|
||||
// Create a member model object
|
||||
$oMemberModel = &getModel('member');
|
||||
$config = $oMemberModel->getMemberConfig();
|
||||
|
||||
// Check if there is recoding table.
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isTableExists('member_login_count')) return new Object($error, $message);
|
||||
|
||||
if(!$oDB->isTableExists('member_login_count') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
|
||||
|
||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
$output = executeQuery('member.getLoginCountByIp', $args);
|
||||
if($output->data && $output->data->count)
|
||||
{
|
||||
// Create a member model object
|
||||
$oMemberModel = &getModel('member');
|
||||
$config = $oMemberModel->getMemberConfig();
|
||||
$last_update = strtotime($output->data->last_update);
|
||||
$term = intval(time()-$last_update);
|
||||
//update, if IP address access in a short time, update count. If not, make count 1.
|
||||
|
|
@ -398,10 +399,14 @@
|
|||
function recordMemberLoginError($error = 0, $message = 'success', $args = NULL)
|
||||
{
|
||||
if($error == 0 || !$args->member_srl) return new Object($error, $message);
|
||||
|
||||
// Create a member model object
|
||||
$oMemberModel = &getModel('member');
|
||||
$config = $oMemberModel->getMemberConfig();
|
||||
|
||||
// Check if there is recoding table.
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isTableExists('member_count_history')) return new Object($error, $message);
|
||||
|
||||
if(!$oDB->isTableExists('member_count_history') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
|
||||
|
||||
$output = executeQuery('member.getLoginCountHistoryByMemberSrl', $args);
|
||||
if($output->data && $output->data->content)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue