Re: PEAR Auth: Duplicate usernames

From: Date: Thu, 04 Sep 2003 08:45:01 +0000
Subject: Re: PEAR Auth: Duplicate usernames
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7575@lists.php.net to get a copy of this message
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

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