PrestaShop get current user information
Today we talk about PrestaShop get current user information. In this tutorial, we focus on how to get customer information. User email, User name, User id, and other users related information.
You can get the context variable by following.
in the Controller file.
$contextObject = $this->context;
Other files
$contextObject = Context::getContext();
You can get the following user information using the $contextObject.
$contextObject->customer->id;
$contextObject->customer->firstname
$contextObject->customer->lastname
$contextObject->customer->email
$contextObject->customer->firstname
$contextObject->customer->lastname
$contextObject->customer->email