Commit 2f8923a0 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie

More fixes for staff/admin not being set for display_name. Fixed cron job

for email digest - it should run at 6am, not every minute in the 6am hour.
parent d4869099
......@@ -47,6 +47,7 @@ class PluginNotificationEmaildigest extends PluginNotification {
$emaildigest = new StdClass;
$emaildigest->callfunction = 'send_digest';
$emaildigest->hour = '6';
$emaildigest->minute = '0';
return array($emaildigest);
}
......@@ -54,7 +55,7 @@ class PluginNotificationEmaildigest extends PluginNotification {
$users = array();
$sitename = get_config('sitename');
$sql = 'SELECT q.id, u.username, u.firstname, u.lastname, u.preferredname, u.email, q.*,' . db_format_tsfield('ctime').'
$sql = 'SELECT q.id, u.username, u.firstname, u.lastname, u.preferredname, u.email, u.admin, u.staff, q.*,' . db_format_tsfield('ctime').'
FROM ' . get_config('dbprefix') . 'usr u
JOIN ' . get_config('dbprefix') . 'notification_emaildigest_queue q
ON q.usr = u.id
......@@ -70,6 +71,8 @@ class PluginNotificationEmaildigest extends PluginNotification {
$users[$queue->usr]->user->lastname = $queue->lastname;
$users[$queue->usr]->user->preferredname = $queue->preferredname;
$users[$queue->usr]->user->email = $queue->email;
$users[$queue->usr]->user->admin = $queue->admin;
$users[$queue->usr]->user->staff = $queue->staff;
$users[$queue->usr]->user->id = $queue->usr;
$users[$queue->usr]->entries = array();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment