diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-04-19 15:05:39 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-04-19 15:05:39 +0000 |
| commit | 87b7ae578f3c8a72f847c3610bd1ef479569a3ff (patch) | |
| tree | 18739861ecebc98552ba69a7e527d0c6ffd51ae0 /phpBB/includes/auth.php | |
| parent | 4c05450291d939f0d6bf4ea3ba538719cf3b43ba (diff) | |
| download | forums-87b7ae578f3c8a72f847c3610bd1ef479569a3ff.tar forums-87b7ae578f3c8a72f847c3610bd1ef479569a3ff.tar.gz forums-87b7ae578f3c8a72f847c3610bd1ef479569a3ff.tar.bz2 forums-87b7ae578f3c8a72f847c3610bd1ef479569a3ff.tar.xz forums-87b7ae578f3c8a72f847c3610bd1ef479569a3ff.zip | |
Removed need to send db as a parameter to functions
git-svn-id: file:///svn/phpbb/trunk@189 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/auth.php')
| -rw-r--r-- | phpBB/includes/auth.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index 3730cd5872..79ec6f04f2 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -31,9 +31,10 @@ * TRUE if the user authorized * FALSE if the user is not */ -function auth($type, $db, $id = "", $user_ip = "") +function auth($type, $id = "", $user_ip = "") { - global $userdata; + global $db, $userdata; + switch($type) { // Empty for the moment. @@ -45,8 +46,10 @@ function auth($type, $db, $id = "", $user_ip = "") * The following functions are used for getting user information. They are not related directly to auth() */ -function get_userdata_from_id($userid, $db) +function get_userdata_from_id($userid) { + global $db; + $sql = "SELECT * FROM ".USERS_TABLE." WHERE user_id = $userid"; if(!$result = $db->sql_query($sql)) { @@ -65,7 +68,10 @@ function get_userdata_from_id($userid, $db) } } -function get_userdata($username, $db) { +function get_userdata($username) { + + global $db; + $sql = "SELECT * FROM ".USERS_TABLE." WHERE username = '$username' AND user_level != ".DELETED; if(!$result = $db->sql_query($sql)) { |
