1
0
Fork 0

Restore admin notification email on register approval

- Reverted changes to mod/register.php
- Added "show_in_notification_page" flag to prevent `notify` DB
insertion
This commit is contained in:
Hypolite Petovan 2016-09-30 08:57:16 -04:00
parent aa985502c9
commit f0382bb159
2 changed files with 18 additions and 1 deletions

View file

@ -49,7 +49,7 @@ function notification($params) {
// with $params['show_in_notification_page'] == false, the notification isn't inserted into
// the database, and an email is sent if applicable.
// default, if not specified: true
$show_in_notification_page = ((x($params, 'show_in_notification_page')) ? $params['show_in_notification_page']:True);
$show_in_notification_page = ((x($params, 'show_in_notification_page')) ? $params['show_in_notification_page']:true);
$additional_mail_header = "";
$additional_mail_header .= "Precedence: list\n";

View file

@ -132,6 +132,23 @@ function register_post(&$a) {
$admin_mail_list
);
foreach ($adminlist as $admin) {
notification(array(
'type' => NOTIFY_SYSTEM,
'event' => 'SYSTEM_REGISTER_REQUEST',
'source_name' => $user['username'],
'source_mail' => $user['email'],
'source_nick' => $user['nickname'],
'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['email'],
'uid' => $admin['uid'],
'language' => ($admin['language']?$admin['language']:'en'),
'show_in_notification_page' => false
));
}
info( t('Your registration is pending approval by the site owner.') . EOL ) ;
goaway(z_root());