When deleting a user do I have to delete his authitem

Hi,

When deleting a user do I have delete its AuthItem manually?

There does not seem to be many helper methods when dealing with AuthItems for say for instance getting the Assignment Name of the user record? OR deleting a record also deletes its AuthItem?

Is this normal?

James.

You should ovveride method afterDelete in your model Class. And in the body of the method you may delete what you want.

I think it does if you got relations (inside database) set up properly (for MySQL you have to use InnoDB tables).

Thanks guys.

Are you saying Yii does this automatically?

You may specify this behavior in database through ON DELETE CASCADE (link).

Ahh right ok. Thanks.