Skip to content
Snippets Groups Projects
Commit 7ecafff6 authored by Peter Rotich's avatar Peter Rotich
Browse files

oops: Use department's email when available

The bug was partly due to switch to ORM.
parent b8ee3625
Branches
Tags
No related merge requests found
......@@ -55,7 +55,6 @@ implements TemplateVariable {
var $config;
var $template;
var $email;
var $autorespEmail;
const ALERTS_DISABLED = 2;
......@@ -128,13 +127,10 @@ implements TemplateVariable {
function getAlertEmail() {
global $cfg;
if (!$this->email && ($id = $this->getEmailId())) {
$this->email = Email::lookup($id);
}
if (!$this->email && $cfg) {
$this->email = $cfg->getAlertEmail();
}
return $this->email;
if ($this->email)
return $this->email;
return $cfg ? $cfg->getDefaultEmail() : null;
}
function getEmail() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment