:::: MENU ::::

PrestaShop get current user information

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

Give A Rating

Average Rating / 5. Vote Count

Author: Qaisar Satti
Category: Prestashop
Last Modified: November 28, 2019


So, what do you think ?