I am trying to use xf_user cookie to display different information depending on whether a user is logged on or not. Below is the code, I am thinking to use.
The problem is that when users are not logged in, xf_user is not definied, so I am getting a ton of the below error messages in my error log.
"undefinied index: xf_user".
Any idea, how I can get over this?
Thank you!
The problem is that when users are not logged in, xf_user is not definied, so I am getting a ton of the below error messages in my error log.
"undefinied index: xf_user".
Any idea, how I can get over this?
Thank you!
Code:
$bbuserid = $_COOKIE["xf_user"];
if ($bbuserid != '') {
// display information for users who are logged on:
......
}
if ($bbuserid == '') {
// display information for users who are not logged on:
......
}