Fix #72, also use the new getEMailAddress API to get admin email

This commit is contained in:
Pellaeon Lin 2017-09-17 15:36:25 +08:00
parent 706eda7b30
commit 87f902a4f1
1 changed files with 3 additions and 3 deletions

View File

@ -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));
}
}
}