Skip to content

Commit 25d4d32

Browse files
committed
Skip if no last access info needs to be shown.
1 parent 7012392 commit 25d4d32

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/lib/classes/cron.d/100-mailbox_stats_hourly.inc.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ public function onBeforeRun() {
5353
public function onRunJob() {
5454
global $app, $conf;
5555

56+
// Skip if no last access info needs to be shown.
57+
$mail_config = $app->getconf->get_global_config('mail');
58+
if (!isset($mail_config['mailbox_show_last_access']) || $mail_config['mailbox_show_last_access'] != 'y') {
59+
return;
60+
}
61+
5662
$sql = "SELECT mailuser_id FROM mail_user WHERE server_id = ?";
5763
$records = $app->db->queryAllRecords($sql, $conf['server_id']);
5864
if(count($records) > 0) {

0 commit comments

Comments
 (0)