We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to retrieve user roles ? | Forum

Chmielewski
Chmielewski Aug 25 '20

I can retrieve some very basic data with:

OW::getUser()->getUserObject()

But I have no idea how to retrieve roles an user belongs to. Any idea on how to do that ?

Patricia Zorrilla Leader
Patricia Zorrilla Aug 25 '20

$user_roles = BOL_AuthorizationUserRoleDao::getInstance()->getRoleIdList($userId);


Note that $user_roles is an array.

The Forum post is edited by Patricia Zorrilla Aug 25 '20
dave Leader
dave Aug 26 '20
Topic was moved from General Questions.