getRolesByUser() public abstract 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 abstract 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. |
Please login to continue.