From 87f902a4f1f1488e23a9f6d2161dc580539dc3bb Mon Sep 17 00:00:00 2001 From: Pellaeon Lin Date: Sun, 17 Sep 2017 15:36:25 +0800 Subject: [PATCH] Fix #72, also use the new getEMailAddress API to get admin email --- service/mailservice.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/mailservice.php b/service/mailservice.php index bed408c..25448ac 100644 --- a/service/mailservice.php +++ b/service/mailservice.php @@ -112,8 +112,8 @@ class MailService { $admin_users = $this->groupManager->get('admin')->getUsers(); $to_arr = array(); foreach ( $admin_users as $au ) { - $au_email = $this->config->getUserValue($au->getUID(), 'settings', 'email'); - if ( $au_email !== '' ) { + $au_email = $au->getEMailAddress(); + if ( $au_email !== '' && $au->isEnabled()) { $to_arr[$au_email] = $au->getDisplayName(); } } @@ -153,4 +153,4 @@ class MailService { throw new RegistrationException('Failed recipients: '.print_r($failed_recipients, true)); } -} \ No newline at end of file +}