Welcome Guest, Not a member yet? Register   Sign In
Core Auth Library
#31

[eluser]Circuitbomb[/eluser]
[quote author="Rick Jolly" date="1250290144"]A core auth library must be totally generic, making no assumptions. A few lines of code, and something every developer can do in a couple minutes. That's why there isn't auth in the core. ACL is a different story.

thody, your attempt is already too specific. Username, id, and email could all be the same thing. Don't store a user in the session, just their id. Reason being, if an admin changes any user credentials, they won't update for a logged-in user until their session expires. Don't use a get_attr() method when php magic methods will accomplish the same thing. Also, don't dismiss the dozens of existing auth libraries. At the very least, you could learn something from them.[/quote]

I would think that the point of id/username/email combinations would be that they are different, but unique to only the individual member. Of course one of any of those variables could be used to identify a member, but why use one, when one of the other two may have a specific usefulness in any multi-user system.

I think that in any user system those three forms need to be present, and are the generic values that need met at the least. How does storing the id update changes for a logged in user while the session is still alive compared to if you used the username? I would think that the session would still need to die or be regenerated in order to see the changes regardless of which one you used.

The only difference I see would be the number of characters used.


Messages In This Thread
Core Auth Library - by El Forum - 08-12-2009, 08:53 AM
Core Auth Library - by El Forum - 08-12-2009, 10:44 AM
Core Auth Library - by El Forum - 08-12-2009, 11:00 AM
Core Auth Library - by El Forum - 08-12-2009, 11:54 AM
Core Auth Library - by El Forum - 08-12-2009, 12:05 PM
Core Auth Library - by El Forum - 08-12-2009, 12:32 PM
Core Auth Library - by El Forum - 08-12-2009, 12:45 PM
Core Auth Library - by El Forum - 08-12-2009, 12:49 PM
Core Auth Library - by El Forum - 08-12-2009, 01:04 PM
Core Auth Library - by El Forum - 08-12-2009, 01:24 PM
Core Auth Library - by El Forum - 08-12-2009, 03:07 PM
Core Auth Library - by El Forum - 08-12-2009, 05:12 PM
Core Auth Library - by El Forum - 08-12-2009, 06:01 PM
Core Auth Library - by El Forum - 08-12-2009, 06:57 PM
Core Auth Library - by El Forum - 08-12-2009, 07:41 PM
Core Auth Library - by El Forum - 08-12-2009, 08:15 PM
Core Auth Library - by El Forum - 08-13-2009, 07:25 AM
Core Auth Library - by El Forum - 08-14-2009, 02:56 AM
Core Auth Library - by El Forum - 08-14-2009, 04:56 AM
Core Auth Library - by El Forum - 08-14-2009, 08:12 AM
Core Auth Library - by El Forum - 08-14-2009, 08:18 AM
Core Auth Library - by El Forum - 08-14-2009, 08:19 AM
Core Auth Library - by El Forum - 08-14-2009, 08:29 AM
Core Auth Library - by El Forum - 08-14-2009, 08:51 AM
Core Auth Library - by El Forum - 08-14-2009, 09:02 AM
Core Auth Library - by El Forum - 08-14-2009, 09:19 AM
Core Auth Library - by El Forum - 08-14-2009, 09:33 AM
Core Auth Library - by El Forum - 08-14-2009, 11:23 AM
Core Auth Library - by El Forum - 08-14-2009, 11:49 AM
Core Auth Library - by El Forum - 08-14-2009, 12:38 PM
Core Auth Library - by El Forum - 08-14-2009, 12:56 PM
Core Auth Library - by El Forum - 08-14-2009, 01:07 PM
Core Auth Library - by El Forum - 08-14-2009, 01:10 PM
Core Auth Library - by El Forum - 08-14-2009, 02:21 PM
Core Auth Library - by El Forum - 08-14-2009, 06:39 PM
Core Auth Library - by El Forum - 08-16-2009, 01:38 AM
Core Auth Library - by El Forum - 08-16-2009, 06:02 AM
Core Auth Library - by El Forum - 08-16-2009, 09:02 AM
Core Auth Library - by El Forum - 08-16-2009, 11:18 AM
Core Auth Library - by El Forum - 08-16-2009, 01:17 PM
Core Auth Library - by El Forum - 08-16-2009, 01:37 PM
Core Auth Library - by El Forum - 08-16-2009, 03:12 PM
Core Auth Library - by El Forum - 08-16-2009, 04:03 PM
Core Auth Library - by El Forum - 08-16-2009, 06:23 PM
Core Auth Library - by El Forum - 08-16-2009, 07:01 PM
Core Auth Library - by El Forum - 08-21-2009, 01:15 AM
Core Auth Library - by El Forum - 08-21-2009, 05:06 AM
Core Auth Library - by El Forum - 08-22-2009, 07:04 AM
Core Auth Library - by El Forum - 08-22-2009, 07:45 AM
Core Auth Library - by El Forum - 08-22-2009, 04:29 PM
Core Auth Library - by El Forum - 08-22-2009, 07:12 PM
Core Auth Library - by El Forum - 08-23-2009, 05:43 AM
Core Auth Library - by El Forum - 08-24-2009, 06:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB