1
0
Fork 0

Added setting to customize system notifications' sender email address

This commit is contained in:
Silke Meyer 2015-01-31 08:46:05 +01:00
parent 1f5d8167c7
commit a485653d6b

View file

@ -28,7 +28,11 @@ function notification($params) {
if(strpos($hostname,':')) if(strpos($hostname,':'))
$hostname = substr($hostname,0,strpos($hostname,':')); $hostname = substr($hostname,0,strpos($hostname,':'));
// $sender_email = t('noreply') . '@' . $hostname;
$sender_email = $a->config['sender_email'];
if (empty($sender_email)) {
$sender_email = t('noreply') . '@' . $hostname; $sender_email = t('noreply') . '@' . $hostname;
}
$user = q("SELECT `nickname` FROM `user` WHERE `uid` = %d", intval($params['uid'])); $user = q("SELECT `nickname` FROM `user` WHERE `uid` = %d", intval($params['uid']));
if ($user) if ($user)