rbac\DbManager getRolesByUser()

getRolesByUser() public method

Returns the roles that are assigned to the user via assign().

Note that child roles that are not assigned directly to the user will not be returned.

public yii\rbac\Role[] getRolesByUser ( $userId )
$userId string|integer

The user ID (see yii\web\User::$id)

return yii\rbac\Role[]

All roles directly assigned to the user. The array is indexed by the role names.

doc_Yii
2016-10-30 17:09:59
Comments
Leave a Comment

Please login to continue.