How to customize the default User class?


Since the default User class has already got many features such for login, session, ACL, etc, I just considering using User for all my users: including agents, merchants, members, etc.

But agents, merchants, members have their own special attributes data, how could I customize those special attributes for different user roles (agents, merchants, members, etc) ?

Thanks a lot.

You can create separate classes for each of the users types. Then use pointers to create relation between the general user class and the specific ones.

1 Like