aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/ucp/ucp_profile.php37
-rw-r--r--phpBB/language/en/common.php2
-rw-r--r--phpBB/language/en/ucp.php2
3 files changed, 8 insertions, 33 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 8d8d42e742..be0833254b 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -183,37 +183,12 @@ class ucp_profile
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
- // Grab an array of user_id's with a_user permissions ... these users can activate a user
- $admin_ary = $auth->acl_get_list(false, 'a_user', false);
- $admin_ary = (!empty($admin_ary[0]['a_user'])) ? $admin_ary[0]['a_user'] : array();
-
- // Also include founders
- $where_sql = ' WHERE user_type = ' . USER_FOUNDER;
-
- if (sizeof($admin_ary))
- {
- $where_sql .= ' OR ' . $db->sql_in_set('user_id', $admin_ary);
- }
-
- $sql = 'SELECT user_id, username, user_email, user_lang, user_jabber, user_notify_type
- FROM ' . USERS_TABLE . ' ' .
- $where_sql;
- $result = $db->sql_query($sql);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $messenger->template('admin_activate', $row['user_lang']);
- $messenger->set_addresses($row);
-
- $messenger->assign_vars(array(
- 'USERNAME' => htmlspecialchars_decode($data['username']),
- 'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}",
- 'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey")
- );
-
- $messenger->send($row['user_notify_type']);
- }
- $db->sql_freeresult($result);
+ $notifications_manager = $phpbb_container->get('notification_manager');
+ $notifications_manager->add_notifications('notification.type.admin_activate_user', array(
+ 'user_id' => $user->data['user_id'],
+ 'user_actkey' => $user_actkey,
+ 'user_regdate' => time(), // Notification time
+ ));
}
user_active_flip('deactivate', $user->data['user_id'], INACTIVE_PROFILE);
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 79d504a67d..966135ad6f 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -467,7 +467,7 @@ $lang = array_merge($lang, array(
'NOTIFICATION_TOPIC_DISAPPROVED' => '<strong>Topic disapproved</strong>:',
'NOTIFICATION_TOPIC_IN_QUEUE' => '<strong>Topic approval</strong> request by %1$s:',
'NOTIFICATION_TYPE_NOT_EXIST' => 'The notification type "%s" is missing from the file system.',
- 'NOTIFICATION_ADMIN_ACTIVATE_USER' => '<strong>Activation required</strong> for newly registered user: ā€œ%1$sā€',
+ 'NOTIFICATION_ADMIN_ACTIVATE_USER' => '<strong>Activation required</strong> for deactivated or newly registered user: ā€œ%1$sā€',
// Used in conjuction with NOTIFICATION_BOOKMARK and NOTIFICATION_POST.
'NOTIFICATION_MANY_OTHERS' => 'others',
'NOTIFICATION_X_OTHERS' => array(
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 07751d1f7f..1faa623b44 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -339,7 +339,7 @@ $lang = array_merge($lang, array(
'NOTIFICATION_TYPE_QUOTE' => 'Someone quotes you in a post',
'NOTIFICATION_TYPE_REPORT' => 'Someone reports a post',
'NOTIFICATION_TYPE_TOPIC' => 'Someone creates a topic in a forum to which you are subscribed',
- 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER' => 'Newly registered user requiring activation',
+ 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER' => 'User requiring activation',
'NOTIFY_METHOD' => 'Notification method',
'NOTIFY_METHOD_BOTH' => 'Both',