Jump to content

I have a question about $Cookie Class.


JasonWang
 Share

Recommended Posts

I am trying to read code of psshop.

 

In config/config.inc.php file, there are following codes.

/* Create employee if in BO, customer else */
if (defined('_PS_ADMIN_DIR_'))
{
$employee = new Employee($cookie->id_employee);
$context->employee = $employee;


/* Auth on shops are recached after employee assignation */
if ($employee->id_profile != _PS_ADMIN_PROFILE_)
Shop::cacheShops(true);


$cookie->id_lang = (int)$employee->id_lang;
}

$cookie is an instance of Cookie.

I think the this part ($cookie->id_employee) tells that the Cookie Class or its parental classes should have a field named id_employee. 

 

But I didn't find this field named id_employee. Do I miss any thing there? Really appreciated if you could give any possible answer.

Edited by JasonWang (see edit history)

Share this post


Link to post
Share on other sites

this field will be added to $cookie object only when you're logged as an employee in back office

you're looking for place, where this field is defined?

Could you point out where is this field ($cookie->id_employee) defined? Thank you so much.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More