diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index c0ae5b917a..efe43e2fda 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -108,6 +108,7 @@
[Fix] Posting errors with CAPTCHAs using user::add_lang(). (Bug #55245)
[Fix] Use memcache::replace() instead of memcache::set() for existing keys to prevent problems.
[Fix] Check for required functions in eAccelerator. (Bug #54465).
+ [Change] Log activation through inactive users ACP. (Bug #30145)
[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)
[Change] Use em dash instead of hyphen/minus as separator in ATOM Feeds item statistics. (Bug #53565)
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
index 3d0c0a2780..1a12c4967c 100644
--- a/phpBB/includes/acp/acp_inactive.php
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -90,22 +90,19 @@ class acp_inactive
if ($action == 'activate')
{
- if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
- {
- // Get those 'being activated'...
- $sql = 'SELECT user_id, username, user_email, user_lang
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $mark) . '
- AND user_type = ' . USER_INACTIVE;
- $result = $db->sql_query($sql);
+ // Get those 'being activated'...
+ $sql = 'SELECT user_id, username' . (($config['require_activation'] == USER_ACTIVATION_ADMIN) ? ', user_email, user_lang' : '') . '
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $mark) . '
+ AND user_type = ' . USER_INACTIVE;
+ $result = $db->sql_query($sql);
- $inactive_users = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $inactive_users[] = $row;
- }
- $db->sql_freeresult($result);
+ $inactive_users = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $inactive_users[] = $row;
}
+ $db->sql_freeresult($result);
user_active_flip('activate', $mark);
@@ -136,6 +133,15 @@ class acp_inactive
$messenger->save_queue();
}
+ if (!empty($inactive_users))
+ {
+ foreach ($inactive_users as $row)
+ {
+ add_log('admin', 'LOG_USER_ACTIVE', $row['username']);
+ add_log('user', $row['user_id'], 'LOG_USER_ACTIVE_USER');
+ }
+ }
+
// For activate we really need to redirect, else a refresh can result in users being deactivated again
$u_action = $this->u_action . "&$u_sort_param&start=$start";
$u_action .= ($per_page != $config['topics_per_page']) ? "&users_per_page=$per_page" : '';