From 7687342849536cd53f6cd122f9d80924bcb015b7 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Tue, 9 Sep 2014 22:07:47 +0200 Subject: [PATCH] fix email for - registration request - registration approval - account created by admin add a reditect after registration approval or deny --- include/enotify.php | 9 ++------- mod/admin.php | 2 +- mod/register.php | 4 +--- mod/regmod.php | 9 +++++++-- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/include/enotify.php b/include/enotify.php index bad94597aa..04db10500a 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -320,7 +320,7 @@ function notification($params) { $sitelink = t('Please visit %s to approve or reject the request.'); $tsitelink = sprintf( $sitelink, $params['link'] ); - $hsitelink = sprintf( $sitelink, '' . $sitename . ''); + $hsitelink = sprintf( $sitelink, '' . $sitename . '

'); $itemlink = $params['link']; break; case "SYSTEM_DB_UPDATE_FAIL": @@ -336,11 +336,6 @@ function notification($params) { // add a notification to the user, with could be inexistent) $subject = $params['subject']; $preamble = $params['preamble']; - if (x($params,'epreamble')){ - $epreamble = $params['epreamble']; - } else { - $epreamble = str_replace("\n","
\n",$preamble); - } $body = $params['body']; $sitelink = ""; $tsitelink = ""; @@ -554,7 +549,7 @@ function notification($params) { $email_html_body = replace_macros($tpl,array( '$banner' => $datarray['banner'], '$product' => $datarray['product'], - '$preamble' => $datarray['preamble'], + '$preamble' => str_replace("\n","
\n",$datarray['preamble']), '$sitename' => $datarray['sitename'], '$siteurl' => $datarray['siteurl'], '$source_name' => $datarray['source_name'], diff --git a/mod/admin.php b/mod/admin.php index 537702b55b..dff8ee1567 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -795,7 +795,7 @@ function admin_page_users_post(&$a){ notification(array( 'type' => "SYSTEM_EMAIL", - 'to_email' => $email, + 'to_email' => $nu['email'], 'subject'=> sprintf( t('Registration details for %s'), $a->config['sitename']), 'preamble'=> $preamble, 'body' => $body)); diff --git a/mod/register.php b/mod/register.php index 4ad84ecd6f..4c0860e6e3 100644 --- a/mod/register.php +++ b/mod/register.php @@ -48,8 +48,6 @@ function register_post(&$a) { } - require_once('include/user.php'); - $arr = $_POST; $arr['blocked'] = $blocked; @@ -140,7 +138,7 @@ function register_post(&$a) { 'source_link' => $a->get_baseurl()."/admin/users/", 'link' => $a->get_baseurl()."/admin/users/", 'source_photo' => $a->get_baseurl() . "/photo/avatar/".$user['uid'].".jpg", - 'to_email' => $admin['mail'], + 'to_email' => $admin['email'], 'uid' => $admin['uid'], 'language' => ($admin['language']?$admin['language']:'en')) ); diff --git a/mod/regmod.php b/mod/regmod.php index 05f33ab11f..53e6716f26 100644 --- a/mod/regmod.php +++ b/mod/regmod.php @@ -1,6 +1,7 @@