[eluser]TheFuzzy0ne[/eluser]
Hi everyone. I'm at my wits end with deciding on how best to manage my users.
I would like an object that represents a user, so that administrators and users can change certain things, such as passwords and other profile information. I am also looking into how I can handle the users login, logout, and any bans.
The problem is I can't decide how to separate the two tasks. I was thinking of using a model to represent a user, and I was thinking about extending the Session class for things such as logging in and out.
My dilemma is that I find the line between both of these seemingly separate tasks blurry at best. One thing I am trying to integrate, is a banning system, where the ban will automatically take effect when it's placed, so if a user is logged in and they are banned, they will be logged out on their next page request.
I've seen FreakAuth, and EZAuth, and SimpleAuth Lib, but none of these seem to be the solution I require.
I'd really appreciate suggestions here on how I should achieve both of these things. Should I extend the session class? Should I use a library for both parts, or just for one and use a model for another? Should I extend the Session class? I'm seriously stuck on this and my blood pressure is going through the roof as I've already spent far too much time on this project and haven't really got very far.
Many thanks in advance.