Logged-In User Role

Hello, I have 2 activeRecords:Admin and Operator. These two active records both can signed in. Depending on which on sign in, the view is different. So I need to declare role for user when user sign in and i need function which return user’s role like getId() function in CwebUser class. getId() function return id of the logged-in user. Help me.

I’m pretty sure there’s a topic in the documentation explaining exactly this question.