I'm using the following code:
Code: Select all
//groupId
$this->load->language('account/account');
if ($this->customer->isLogged()) {
$data['groupId'] = $this->customer->getGroupId();
} elseif ($this->config->get('config_customer_group_id')) {
$data['groupId'] = $this->config->get('config_customer_group_id');
}
Code: Select all
<p>GroupID: <?php echo (int)$groupId ?></p>
GroupID: 0
When the intended groupID is 4.
The signed in user is assigned to a group with the ID of 4.