diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2008-12-27 12:18:04 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-12-27 12:18:04 +0000 |
commit | 25725c98503c3a9ba8b5de4b91c2528b6c974a03 (patch) | |
tree | adf5470b0a4f90ef44b9be7a9761c4a6153072aa /phpBB/includes/functions_user.php | |
parent | 297af28a40e5fa94de0cb2f57d807b39020f44f0 (diff) | |
download | forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar.gz forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar.bz2 forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.tar.xz forums-25725c98503c3a9ba8b5de4b91c2528b6c974a03.zip |
replace constants with class constants.
ACL_YES, ACL_NO, ACL_NEVER, USER_NORMAL, USER_IGNORE, USER_INACTIVE, USER_FOUNDER
git-svn-id: file:///svn/phpbb/trunk@9233 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r-- | phpBB/includes/functions_user.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 8a72e775c5..c9eafc3d90 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -91,7 +91,7 @@ function update_last_username() // Get latest username $sql = 'SELECT user_id, username, user_colour FROM ' . USERS_TABLE . ' - WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') + WHERE user_type IN (' . phpbb::USER_NORMAL . ', ' . phpbb::USER_FOUNDER . ') ORDER BY user_id DESC'; $result = $db->sql_query_limit($sql, 1); $row = $db->sql_fetchrow($result); @@ -276,7 +276,7 @@ function user_add($user_row, $cp_data = false) group_set_user_default($user_row['group_id'], array($user_id), false); // set the newest user and adjust the user count if the user is a normal user and no activation mail is sent - if ($user_row['user_type'] == USER_NORMAL) + if ($user_row['user_type'] == phpbb::USER_NORMAL) { set_config('newest_user_id', $user_id, true); set_config('newest_username', $user_row['username'], true); @@ -390,7 +390,7 @@ function user_delete($mode, $user_id, $post_username = false) } // If the user is inactive and newly registered we assume no posts from this user being there... - if ($user_row['user_type'] == USER_INACTIVE && $user_row['user_inactive_reason'] == INACTIVE_REGISTER && !$user_row['user_posts']) + if ($user_row['user_type'] == phpbb::USER_INACTIVE && $user_row['user_inactive_reason'] == INACTIVE_REGISTER && !$user_row['user_posts']) { } else @@ -566,7 +566,7 @@ function user_delete($mode, $user_id, $post_username = false) } // Decrement number of users if this user is active - if ($user_row['user_type'] != USER_INACTIVE && $user_row['user_type'] != USER_IGNORE) + if ($user_row['user_type'] != phpbb::USER_INACTIVE && $user_row['user_type'] != phpbb::USER_IGNORE) { set_config('num_users', $config['num_users'] - 1, true); } @@ -605,14 +605,14 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL) { $sql_ary = array(); - if ($row['user_type'] == USER_IGNORE || $row['user_type'] == USER_FOUNDER || - ($mode == 'activate' && $row['user_type'] != USER_INACTIVE) || - ($mode == 'deactivate' && $row['user_type'] == USER_INACTIVE)) + if ($row['user_type'] == phpbb::USER_IGNORE || $row['user_type'] == phpbb::USER_FOUNDER || + ($mode == 'activate' && $row['user_type'] != phpbb::USER_INACTIVE) || + ($mode == 'deactivate' && $row['user_type'] == phpbb::USER_INACTIVE)) { continue; } - if ($row['user_type'] == USER_INACTIVE) + if ($row['user_type'] == phpbb::USER_INACTIVE) { $activated++; } @@ -625,9 +625,9 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL) } $sql_ary += array( - 'user_type' => ($row['user_type'] == USER_NORMAL) ? USER_INACTIVE : USER_NORMAL, - 'user_inactive_time' => ($row['user_type'] == USER_NORMAL) ? time() : 0, - 'user_inactive_reason' => ($row['user_type'] == USER_NORMAL) ? $reason : 0, + 'user_type' => ($row['user_type'] == phpbb::USER_NORMAL) ? phpbb::USER_INACTIVE : phpbb::USER_NORMAL, + 'user_inactive_time' => ($row['user_type'] == phpbb::USER_NORMAL) ? time() : 0, + 'user_inactive_reason' => ($row['user_type'] == phpbb::USER_NORMAL) ? $reason : 0, ); $sql_statements[$row['user_id']] = $sql_ary; @@ -720,7 +720,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas // Create a list of founder... $sql = 'SELECT user_id, user_email, username_clean FROM ' . USERS_TABLE . ' - WHERE user_type = ' . USER_FOUNDER; + WHERE user_type = ' . phpbb::USER_FOUNDER; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -3244,7 +3244,7 @@ function group_update_listings($group_id) break 3; } - if ($setting != ACL_YES) + if ($setting != phpbb::ACL_YES) { continue; } |