how I can display information on the Cgridview according to the logged user?

Hi forum,I have this:

State:

id

data1

Company:

id

data1

state_fk

Planning

id

data1

company_fk

the username of users in the system will be the name of a state,what I want is, according to the user, when he accesses to Planning index i need that he only see whose having Companies whose status match with the username. sorry for my English and thanks

Read this:

http://www.yiiframework.com/doc-2.0/guide-db-active-record.html