Merge pull request #1943 from tobiasd/20151007-adminname

personalise emails send from the server
This commit is contained in:
Michael Vogel 2015-10-12 07:50:40 +02:00
commit a58be37930
2 changed files with 24 additions and 1 deletions

View file

@ -77,3 +77,22 @@ line to your .htconfig.php:
## theme ## ## theme ##
* hide_eventlist (Boolean) - Don't show the birthdays and events on the profile and network page * hide_eventlist (Boolean) - Don't show the birthdays and events on the profile and network page
# Administrator Options #
Enabling the admin panel for an account, and thus making the account holder
admin of the node, is done by setting the variable
$a->config['admin_email'] = "someone@example.com";
where you have to match the email address used for the account with the one you
enter to the .htconfig file. If more then one account should be able to access
the admin panel, seperate the email addresses with a comma.
$a->config['admin_email'] = "someone@example.com,someonelese@example.com";
If you want to have a more personalized closing line for the notification
emails you can set a variable for the admin_name.
$a->config['admin_name'] = "Marvin";

View file

@ -20,7 +20,11 @@ function notification($params) {
$siteurl = $a->get_baseurl(true); $siteurl = $a->get_baseurl(true);
$thanks = t('Thank You,'); $thanks = t('Thank You,');
$sitename = $a->config['sitename']; $sitename = $a->config['sitename'];
$site_admin = sprintf( t('%s Administrator'), $sitename); if (!x($a->config['admin_name'])) {
$site_admin = sprintf( t('%s Administrator'), $sitename);
} else {
$site_admin = sprintf( t('%1$s, %2$s Administrator'), $a->config['admin_name'], $sitename);
}
$nickname = ""; $nickname = "";
$sender_name = $sitename; $sender_name = $sitename;