Added more "XDAY" options to add_lead duplicate checks in the Non-Agent API
Added more failed login details for level 9 users to User Modify page Added User Logins Report Added webserver/URL logins section to User Stats report for level 9 users Added more failed login logging in user_authorization function.php scripts Added more failed login reason messages display to timeclock.php Added vicidial_user_logins_daily TEOD population to ADMIN keepalive script git-svn-id: svn://192.168.202.10@3642 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -156,9 +156,10 @@
|
||||
# 220310-0959 - Added purging of vicidial_sync_log table
|
||||
# 220312-0819 - Added CID Group Auto-Rotate to check for List use
|
||||
# 220526-1444 - Fix for CID auto-rotate functions
|
||||
# 220921-1255 - Added vicidial_user_logins_daily TEOD population
|
||||
#
|
||||
|
||||
$build = '220526-1444';
|
||||
$build = '220921-1255';
|
||||
|
||||
$DB=0; # Debug flag
|
||||
$teodDB=0; # flag to log Timeclock End of Day processes to log file
|
||||
@@ -1668,6 +1669,32 @@ if ($timeclock_end_of_day_NOW > 0)
|
||||
if (!$Q) {print "$sthArows vicidial_inbound_groups rows closing_time_now_trigger value reset \n";}
|
||||
if ($teodDB) {$event_string = "$sthArows vicidial_inbound_groups rows closing_time_now_trigger value reset"; &teod_logger;}
|
||||
|
||||
# population of vicidial_user_logins_daily table and reset of vicidial_users table
|
||||
if (!$Q) {print "\nProcessing vicidial_user_logins_daily/vicidial_users tables...\n";}
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_user_logins_daily(user,login_day,last_login_date,last_ip,failed_login_attempts_today,failed_login_count_today,failed_last_ip_today,failed_last_type_today) SELECT user,'$today_date',last_login_date,last_ip,failed_login_attempts_today,failed_login_count_today,failed_last_ip_today,failed_last_type_today from vicidial_users where last_login_date >= \"$RMSQLdate\";";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
$event_string = "$sthArows rows inserted into vicidial_user_logins_daily table";
|
||||
if (!$Q) {print "$event_string \n";}
|
||||
if ($teodDB) {&teod_logger;}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
$stmtA = "UPDATE vicidial_users SET failed_login_attempts_today=0,failed_login_count_today=0,failed_last_ip_today='',failed_last_type_today='';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
$event_string = "$sthArows rows reset in vicidial_users table";
|
||||
if (!$Q) {print "$event_string \n";}
|
||||
if ($teodDB) {&teod_logger;}
|
||||
|
||||
$stmtA = "optimize table vicidial_users;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
}
|
||||
|
||||
##### BEGIN max stats end of day process #####
|
||||
# set OPEN max stats records to CLOSING for processing
|
||||
$stmtA = "UPDATE vicidial_daily_max_stats SET stats_flag='CLOSING' where stats_flag='OPEN';";
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# !!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!
|
||||
# THIS SCRIPT SHOULD ONLY BE RUN ON ONE SERVER ON YOUR CLUSTER
|
||||
#
|
||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 60717-1214 - changed to DBI by Marin Blu
|
||||
@@ -30,6 +30,7 @@
|
||||
# 190222-1321 - Added optional flushing of vicidial_sessions_recent table
|
||||
# 190503-1606 - Added flushing of vicidial_sip_event_recent table
|
||||
# 191029-1555 - Added flushing of vicidial_agent_vmm_overrides table
|
||||
# 220921-1148 - Added optimize of vicidial_users table
|
||||
#
|
||||
|
||||
$session_flush=0;
|
||||
@@ -457,6 +458,20 @@ if (!$T)
|
||||
if (!$Q) {print " - OPTIMIZE vicidial_inbound_groups \n";}
|
||||
|
||||
|
||||
$stmtA = "OPTIMIZE table vicidial_users;";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
if (!$T)
|
||||
{
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
|
||||
$sthA->finish();
|
||||
}
|
||||
if (!$Q) {print " - OPTIMIZE vicidial_users \n";}
|
||||
|
||||
|
||||
### Gather active servers from the database
|
||||
$stmtA = "SELECT server_ip,server_id FROM servers where active='Y' and active_asterisk_server='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
|
||||
Reference in New Issue
Block a user