Topic: read user name on an unprotected page ? (Read 870 times)
Atari ST fan
Posts: 8
68 credits Members referred : 0
« on: Aug 19, 2006, 08:20:42 PM »
Hello,
I use $_SESSION['user'] and also $user = $test_page_protect->user; to read the username. This is working as long as I do this in a protected site.
Now I want to read the user name on an unprotected page. I tried both but I was not successful. Actually I was not able to use the $test_page_protect->user function without getting Errors.
I was expecting: If the user is logged in, the username will be returned, if he is logged out, <blank> will be returned.
Can someone help me ? I just want to know which user is logged in when he is accessing an unprotected page.
Thank you, Philipp
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
Atari ST fan
Posts: 8
68 credits Members referred : 0
« Reply #2 on: Aug 19, 2006, 09:40:59 PM »
Hello,
I just made a test: I logged in as a user, accessed a protected page and with $_SESSION['user'] I got the username. Perfect. But when I now access an unprotected page, $_SESSION['user'] returns <blank> even though the user is still logged on...
Philipp
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
I just made a test: I logged in as a user, accessed a protected page and with $_SESSION['user'] I got the username. Perfect. But when I now access an unprotected page, $_SESSION['user'] returns <blank> even though the user is still logged on...
Philipp
do you tested this in a new window of internet explorer?