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:
parent
9c2b1d39ea
commit
6684107b66
6 changed files with 88 additions and 67 deletions
6
boot.php
6
boot.php
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue