How do I get Yii2 RBAC via DbManager use Joomla “user” table and userid from Joomla session?

I have Joomla running to control the placement of content and to manage user registration/login. Also I have Yii2 running which I integrated by following these instructions:

I want a user to be able to login through Joomla’s login system, and then use Yii2’s built-in RBAC support via DbManager ( to verify the logged in user’s permissions in the auth_assignment table before running a particular Yii2 function.

I’m not sure what I have to do to tell Yii2 to use the “user” table used by Joomla and also to check this table for the userid when performing RBAC permission checks such as the following example:

if (Yii::$app->user->can('some-auth-item')) 


        return $this->render('some-page'); 


Is it the same base?

If not, I think you configure 2 databases. I Think you need change a you-app/advanced/common/models/User.php and change tableName() method to joomla user table.