Re: Auth - usernames not unique
| From: | Justin Patrin | Date: | Mon, 06 Dec 2004 19:20:01 +0000 |
| Subject: | Re: Auth - usernames not unique | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16055@lists.php.net to get a copy of this message | ||
On Mon, 6 Dec 2004 17:45:43 +0100, Alexander Petri <alex.petri@gmx.de> wrote:
> is there an option or workaround in auth where username doesnt have to be
> unique?
>
> i mean only the combination of username and password has to be unique
> that means only the password has to be unique
>
> in my table there is an PKey (autoincrement) for identifiing the real
> user...
>
Solution 1: Check for the username before adding a new record.
Solution 2: Add UNIQUE(username) to your table definition and the DB
will do the check for you.
--
Justin Patrin