diff options
author | James Atkinson <thefinn@users.sourceforge.net> | 2001-02-25 04:02:12 +0000 |
---|---|---|
committer | James Atkinson <thefinn@users.sourceforge.net> | 2001-02-25 04:02:12 +0000 |
commit | 35f60609f92e7503ff7b7a2959586335650f345b (patch) | |
tree | ef4cfe256053736990158d625c16aa154e36b3a9 /phpBB/functions | |
parent | c965a3daf4eef4f8ebd7342d85bd012e08065e3e (diff) | |
download | forums-35f60609f92e7503ff7b7a2959586335650f345b.tar forums-35f60609f92e7503ff7b7a2959586335650f345b.tar.gz forums-35f60609f92e7503ff7b7a2959586335650f345b.tar.bz2 forums-35f60609f92e7503ff7b7a2959586335650f345b.tar.xz forums-35f60609f92e7503ff7b7a2959586335650f345b.zip |
*** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@59 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/functions')
-rw-r--r-- | phpBB/functions/auth.php | 21 | ||||
-rw-r--r-- | phpBB/functions/error.php | 2 |
2 files changed, 21 insertions, 2 deletions
diff --git a/phpBB/functions/auth.php b/phpBB/functions/auth.php index c890a3e2e7..df4d99691d 100644 --- a/phpBB/functions/auth.php +++ b/phpBB/functions/auth.php @@ -129,7 +129,26 @@ function get_userdata_from_id($userid, $db) $userdata = array("error" => "1"); return ($userdata); } - if($db->sql_numrows()) + if($db->sql_numrows($result)) + { + $myrow = $db->sql_fetchrowset($result); + return($myrow[0]); + } + else + { + $userdata = array("error" => "1"); + return ($userdata); + } +} + +function get_userdata($username, $db) { + $sql = "SELECT * FROM ".USERS_TABLE." WHERE username = '$username' AND user_level != ".DELETED; + if(!$result = $db->sql_query($sql)) + { + $userdata = array("error" => "1"); + } + + if($db->sql_numrows($result)) { $myrow = $db->sql_fetchrowset($result); return($myrow[0]); diff --git a/phpBB/functions/error.php b/phpBB/functions/error.php index 29a985c714..1b819f511b 100644 --- a/phpBB/functions/error.php +++ b/phpBB/functions/error.php @@ -60,7 +60,7 @@ function error_die($db, $error_code = "", $error_msg = "") } if(DEBUG) { - $error_msg .= "<br>Line number: ".__LINE__."<br>In File: ".__FILE__; + //$error_msg .= "<br>Line number: ".__LINE__."<br>In File: ".__FILE__; } $template->set_file(array("error_body" => "error_body.tpl")); $template->set_var(array("ERROR_MESSAGE" => $error_msg)); |