1
1
Fork 0

multiple admin mails. It is now possible to define more than one admin mail address. You can now add multiple addresses, separated by comma.

This commit is contained in:
Michael Vogel 2013-12-02 00:11:31 +01:00
commit 6684107b66
6 changed files with 88 additions and 67 deletions

View file

@ -1906,7 +1906,11 @@ if(! function_exists('feed_birthday')) {
if(! function_exists('is_site_admin')) {
function is_site_admin() {
$a = get_app();
if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email']))
$adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
//if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email']))
if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && in_array($a->user['email'], $adminlist))
return true;
return false;
}