1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

A reworking of how we handle inactive users

git-svn-id: file:///svn/phpbb/trunk@6394 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Graham Eames
2006-09-23 12:27:51 +00:00
parent 36fa521f92
commit cbece78f7b
15 changed files with 433 additions and 171 deletions

View File

@@ -158,6 +158,8 @@ function user_add($user_row, $cp_data = false)
'user_regdate' => time(),
'user_passchg' => time(),
'user_inactive_reason' => 0,
'user_inactive_time' => 0,
'user_lastmark' => time(),
'user_lastvisit' => 0,
'user_lastpost_time' => 0,
@@ -423,7 +425,7 @@ function user_delete($mode, $user_id, $post_username = false)
* Flips user_type from active to inactive and vice versa, handles
* group membership updates
*/
function user_active_flip($user_id, $user_type, $user_actkey = false, $username = false, $no_log = false)
function user_active_flip($user_id, $user_type, $user_actkey = false, $username = false, $reason = 0, $no_log = false)
{
global $db, $user, $auth;
@@ -467,7 +469,9 @@ function user_active_flip($user_id, $user_type, $user_actkey = false, $username
$db->sql_query($sql);
$sql_ary = array(
'user_type' => ($user_type == USER_NORMAL) ? USER_INACTIVE : USER_NORMAL
'user_type' => ($user_type == USER_NORMAL) ? USER_INACTIVE : USER_NORMAL,
'user_inactive_time' => ($user_type == USER_NORMAL) ? time() : 0,
'user_inactive_reason' => ($user_type == USER_NORMAL) ? $reason : 0,
);
if ($user_actkey !== false)