1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-28 18:49:52 +02:00

Remove need for session_ids for "allowed" bots, dump user_founder/user_active in favour of user_type, new user_type, USER_IGNORE

git-svn-id: file:///svn/phpbb/trunk@4603 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2003-10-15 17:43:07 +00:00
parent 8661a45de5
commit a47fa4d6ca
21 changed files with 425 additions and 251 deletions

View File

@@ -410,7 +410,7 @@ switch ($mode)
$sql = 'SELECT username, user_email, user_allow_viewemail, user_lang, user_jabber, user_notify_method
FROM ' . USERS_TABLE . "
WHERE user_id = $user_id
AND user_active = 1";
AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $db->sql_query($sql);
if (!($row = $db->sql_fetchrow($result)))
@@ -676,7 +676,7 @@ switch ($mode)
{
$sql = 'SELECT COUNT(user_id) AS total_users
FROM ' . USERS_TABLE . '
WHERE user_id <> ' . ANONYMOUS . "
WHERE user_type <> ' . USER_IGNORE . "
$where_sql";
$result = $db->sql_query($sql);
@@ -728,6 +728,8 @@ switch ($mode)
);
}
// TODO
// ?????????
$sql = 'SELECT session_user_id, MAX(session_time) AS session_time
FROM ' . SESSIONS_TABLE . '
WHERE session_time >= ' . (time() - 300) . '
@@ -745,7 +747,7 @@ switch ($mode)
// Do the SQL thang
$sql = 'SELECT username, user_id, user_colour, user_allow_viewemail, user_posts, user_regdate, user_rank, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_lastvisit
FROM ' . USERS_TABLE . '
WHERE user_id <> ' . ANONYMOUS . "
WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ")
$where_sql
ORDER BY $order_by";
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);