Hi I have installed Freichat I am using OSdate when I login it shows guest user, when I logout it shows my username.
any suggestions on how I can fix this it seems to be backwards
/* FreiChat STARTS HERE */
$ses=$_SESSION['UserId'];
if(USER_IS_LOGGED_IN)
{
$ses = LOGGED_IN_USERID; //tell freichat the userid of the current user
setcookie("freichat_user", "LOGGED_IN", time()+3600, "/"); // *do not change -> freichat code
}
if($Username_And_Password_Match)
{
$_SESSION['UserId'] = $users['id']; // Modify to suit your requirements
//$ses = null; // Return null if user is not logged in
if(isset($_SESSION['UserId']))
{
$ses=$_SESSION['UserId']; //LOOK, now userid will be passed to FreiChat
}
}
if(!function_exists("freichatx_get_hash"))
{
function freichatx_get_hash(){
if(is_file("/home/***/thaidating.tk/freichat/hardcode.php")){
require "/home/***/thaidating.tk/freichat/hardcode.php";
$temp_id = $ses . $uid;
return md5($temp_id);
}
else
{
echo "<script>alert('module freichatx says: hardcode.php file not found!')</script>";
}
return 0;
}
}
/* FreiChat ENDS HERE */
Hi I have installed Freichat I am using OSdate when I login it shows guest user, when I logout it shows my username.
any suggestions on how I can fix this it seems to be backwards
````
/* FreiChat STARTS HERE */
$ses=$_SESSION['UserId'];
if(USER_IS_LOGGED_IN)
{
$ses = LOGGED_IN_USERID; //tell freichat the userid of the current user
setcookie("freichat_user", "LOGGED_IN", time()+3600, "/"); // *do not change -> freichat code
}
if($Username_And_Password_Match)
{
$_SESSION['UserId'] = $users['id']; // Modify to suit your requirements
//$ses = null; // Return null if user is not logged in
if(isset($_SESSION['UserId']))
{
$ses=$_SESSION['UserId']; //LOOK, now userid will be passed to FreiChat
}
}
if(!function_exists("freichatx_get_hash"))
{
function freichatx_get_hash(){
if(is_file("/home/***/thaidating.tk/freichat/hardcode.php")){
require "/home/***/thaidating.tk/freichat/hardcode.php";
$temp_id = $ses . $uid;
return md5($temp_id);
}
else
{
echo "<script>alert('module freichatx says: hardcode.php file not found!')</script>";
}
return 0;
}
}
/* FreiChat ENDS HERE */
````