mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
Log activation through inactive users ACP. #30145
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10310 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3665540ffb
commit
aec3c26894
2 changed files with 21 additions and 14 deletions
|
@ -108,6 +108,7 @@
|
|||
<li>[Fix] Posting errors with CAPTCHAs using user::add_lang(). (Bug #55245)</li>
|
||||
<li>[Fix] Use memcache::replace() instead of memcache::set() for existing keys to prevent problems.</li>
|
||||
<li>[Fix] Check for required functions in eAccelerator. (Bug #54465).</li>
|
||||
<li>[Change] Log activation through inactive users ACP. (Bug #30145)</li>
|
||||
<li>[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)</li>
|
||||
<li>[Change] Use em dash instead of hyphen/minus as separator in ATOM Feeds item statistics. (Bug #53565)</li>
|
||||
</ul>
|
||||
|
|
|
@ -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" : '';
|
||||
|
|
Loading…
Add table
Reference in a new issue