NYCPHP Meetup

NYPHP.org

[nycphp-talk] User Login / Auth Class - SIMPLISTIC please

-sry sryBoston at hotmail.com
Wed Jan 28 18:20:21 EST 2004


"Mitch Pirtle" <mitchy at spacemonkeylabs.com>
On Wednesday, January 28, 2004 5:48 PM


> -sry wrote:
> > I read through the similarly-subjected thread felix started back in 
> > mid-December (thanks for asking the questions felix and for 
> > brainstorming on the list - I really got my thinking focused reading 
> > that thread). I definitely do NOT need anything that comprehensive.
> 
> Take a look at PEAR::Auth 
> (http://pear.php.net/manual/en/package.authentication.php).  It will 
> even spit out a plain-jane login screen for you.  All you have to do is 
> add the accounts to a MySQL table, and you are good to go.

Thanks Mitch. I did see the reference to PEAR::Auth in the Dec
thread and I did check it out (re-read it over just now to refresh
my memory) but to be honest, believe it or not, this is still a bit
of overkill for my needs.

Here's the scoop. I want to to track the user's "place" in a 
sequenced set of pages and I don't want to let them skip 
ahead in the sequence without completing the preceding
"units" but I didn't really want to bother with a whole login
screen. 

In fact, I'd like to give users the option of not giving me any
kind of ID info at all. Of course, if they do decline to tell
me who they are, I will only track their current session and
when they go away, they lose their "place" and will have to
start from scratch next time. Their loss (their choice).

But for the non-paranoid, all I ask for is a name and
email address and in that case, will create a "permanent"
record for them in the mySQL table so they can come
back a day or week or month later (provided I'm still
able to keep the stuff online months later ;-)) and pick up
where they left off.

Other than checking "have you completed unit 3" before
letting them go onto "unit 4", I'll store some Q&A stuff
for my own person info, feedback type questions on the
stuff in each unit. This is the "data" I'll want to collect later
and view in some kind of report which I'll create for 
myself as "admin." 

Really, it's pretty basic. I'm being lazy, aren't I? I mean,
I *could* just cut n' paste from PEAR::Auth, couldn't I?
Is there anything ready-made out there that just tracks
a user session without all the log in / log off screens and
authentication stuff? I don't care if they aren't who they
say they are--if they say they are Roger Rabbit, I will
show them the pages where Roger Rabbit left off. :-)

> Feel free to come with questions, I have working examples just begging 
> for Cut-N-Paste!
> 
> -- Mitch

ya' got something to cut n' paste that's *this* simple? :)

-sry



More information about the talk mailing list