Albert
Albert

Reputation: 3

How do you get the user role of the currently logged in user in Opencart?

I wanted to get the user role id of the currently logged in user in Opencart for a required tweak on the listings of products. I could try to dig deep into opencart to see but hoping someone can save me time.

Cheers

Upvotes: 0

Views: 736

Answers (1)

Jay Gilford
Jay Gilford

Reputation: 15151

Just use

$this->customer->getCustomerGroupId()

Which will return the value you want

Upvotes: 2

Related Questions