Jump to content

Get User ID


myteam

Recommended Posts

I try to integrate arrow chat software with prestashop

Example from the documentation:

http://www.arrowchat.com/documentation/?p=custom-website

 

function get_user_id() 
{
$userid = NULL;

if (!empty($_COOKIE['userid']))
{
	$userid = $_COOKIE['userid'];
}

return $userid;
}

 

Using the example I write a php to get User ID from Prestashop cookie:

function get_user_id() 
{
    global $cookie;
    $userid = NULL;

    if (isset($cookie->id_customer))
    {
        $userid = $cookie->id_customer;
    }

    return $userid;
}

 

But I always get NULL. Anything wrong with my code? :-[

Apprieciate if someone can shred me some light.

Link to comment
https://forums.phpfreaks.com/topic/262966-get-user-id/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.