com web/bugs: let's try this way.: include/functions.php
| From: | Ferenc Kovacs | Date: | Wed, 23 Jan 2013 12:46:03 +0000 |
| Subject: | com web/bugs: let's try this way.: include/functions.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15368@lists.php.net to get a copy of this message | ||
Commit: f095feecf294a2c0af19a7233ce5e660d55dc7d8
Author: Ferenc Kovacs <tyra3l@gmail.com> Wed, 23 Jan 2013 13:46:03 +0100
Parents: f60160dbd06d3c3149c11bbf759cc97b05a399ed
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=f095feecf294a2c0af19a7233ce5e660d55dc7d8
Log:
let's try this way.
Changed paths:
M include/functions.php
Diff:
diff --git a/include/functions.php b/include/functions.php
index 9a2715a..162cf24 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1718,12 +1718,21 @@ function response_header($title, $extraHeaders = '')
if ($logged_in === 'developer') {
$is_logged = true;
- $username = $auth_user->handle;
} else if (!empty($_SESSION['user'])) {
$is_logged = true;
- $username = $_SESSION['user']->handle;
}
+ if ($logged_in) {
+ $username = false;
+ if (!empty($auth_user->handle)) {
+ $username = $auth_user->handle;
+ }
+ elseif (!empty($_SESSION['user']->handle)) {
+ $username = $_SESSION['user']->handle;
+ }
+ }
+
+
$_header_done = true;
header('Content-Type: text/html; charset=UTF-8');