RE: [PEAR] PEAR Auth: Duplicate usernames

From: Date: Thu, 04 Sep 2003 18:19:56 +0000
Subject: RE: [PEAR] PEAR Auth: Duplicate usernames
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7590@lists.php.net to get a copy of this message
Thanks, Stefan. I've done that, but I'd rather not rely on the db to handle the issue. Andy > -----Original Message----- > From: Stefan Neufeind [mailto:stefan@neufeind.net] > Sent: Thursday, September 04, 2003 4:45 AM > To: pear-general@lists.php.net > Cc: Andy Crain > Subject: Re: [PEAR] PEAR Auth: Duplicate usernames > > On 3 Sep 2003 at 20:42, Andy Crain wrote: > > > I'm currently working the Auth package into an application and > > discovered that it's possible with addUser() to add multiple users > > with the same username. This seems problematic to me, especially in > > situations using removeUser(). My application currently distinguishes > > users by an additional, unique id field, but this is irrelevant to the > > Auth base class since it operates for the most part on usernamecol and > > passwordcol. I'm wondering how others have handled this. My initial > > thoughts are to override either Auth's or the container's addUser() > > method to incorporate a check ensuring that there's only one record > > with $this->username, but wanted to make sure there wasn't an easier > > way before doing that. Andy > > Quick (dirty?) help: Add a "unique"-constraint also on the username- > column :-) > > Stefan > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.pear.general (#7590) next »