User or CWebUser

Hi there everyone,

I would like to ask about User class.

Should I make my own User class (extends CActiveRecord) or should I make use of CWebUser?

I think if I make my own User class, it is easier to manage the dataflow.

However, I havent touched CWebUser, although as far as I know, CWebUser has useful built-in functions such as: ‘isAdmin’, ‘isGuest’, etc

What do you think?

Please let me know your opinions or perhaps even the right method for this.

Thanks

there is a wiki page about this topic

http://www.yiiframework.com/wiki/60/add-information-to-yii-app-user-by-extending-cwebuser

You should use both because they’re separate entities.

User model represents your user table.

CWebUser represents the user instance visiting your web site.

@mbi: thank you for your reply.

In fact, I make this thread because of that page.

That is one useful page for handling User

@jellysandwich:

Thank you for your reply.

Now I know that I’m on the right track =)

I guess that’s all.

Unless there is someone who wants to add things about User or CWebUser here