JasonWang Posted September 20, 2013 Share Posted September 20, 2013 (edited) 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 September 20, 2013 by JasonWang (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 20, 2013 Share Posted September 20, 2013 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? Link to comment Share on other sites More sharing options...
JasonWang Posted September 21, 2013 Author Share Posted September 21, 2013 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? Yes. I am curious where it is dynamically added in. Link to comment Share on other sites More sharing options...
JasonWang Posted September 23, 2013 Author Share Posted September 23, 2013 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. Link to comment Share on other sites More sharing options...
vekia Posted September 23, 2013 Share Posted September 23, 2013 it is created when employee is logging, in admin auth controller Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now