PEAR Auth: Duplicate usernames
| From: | Andy Crain | Date: | Thu, 04 Sep 2003 00:42:08 +0000 |
| Subject: | PEAR Auth: Duplicate usernames | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7572@lists.php.net to get a copy of this message | ||
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