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 .= "
Line number: ".__LINE__."
In File: ".__FILE__;
+ //$error_msg .= "
Line number: ".__LINE__."
In File: ".__FILE__;
}
$template->set_file(array("error_body" => "error_body.tpl"));
$template->set_var(array("ERROR_MESSAGE" => $error_msg));
diff --git a/phpBB/page_header.php b/phpBB/page_header.php
index b259220977..e1b0dc19a0 100644
--- a/phpBB/page_header.php
+++ b/phpBB/page_header.php
@@ -25,9 +25,19 @@
// Parse and show the overall header.
$template->set_file(array("overall_header" => "overall_header.tpl",
"overall_footer" => "overall_footer.tpl"));
+
+if($user_logged_in)
+{
+ $logged_in_status = "You are logged in as ".$userdata["username"].".";
+}
+else
+{
+ $logged_in_status = "You are not logged in.";
+}
$template->set_var(array("SITENAME" => $sitename,
"PHPEX" => $phpEx,
"PAGE_TITLE" => $page_title,
+ "LOGIN_STATUS" => $logged_in_status,
"META_INFO" => $meta_tags));
$template->pparse("output", "overall_header");
diff --git a/phpBB/templates/Default/overall_header.tpl b/phpBB/templates/Default/overall_header.tpl
index 6df9d90685..2429a4591b 100644
--- a/phpBB/templates/Default/overall_header.tpl
+++ b/phpBB/templates/Default/overall_header.tpl
@@ -51,13 +51,13 @@ A:Hover {
|
diff --git a/phpBB/templates/Default/viewforum_footer.tpl b/phpBB/templates/Default/viewforum_footer.tpl
index 5b37eed903..bdc1ba5e93 100644
--- a/phpBB/templates/Default/viewforum_footer.tpl
+++ b/phpBB/templates/Default/viewforum_footer.tpl
@@ -26,7 +26,7 @@
| |