Re: Auth - usernames not unique
| From: | Alexander Petri | Date: | Mon, 06 Dec 2004 23:54:42 +0000 |
| Subject: | Re: Auth - usernames not unique | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16065@lists.php.net to get a copy of this message | ||
that is not a good idea...
for my application, i have given usernames and passwords... (its not from
me)
so my thoughts are:
1. SELECT id FROM table WHERE username='$username' and password='$password'
2. use auth with ID as username....
i have to find out how to feed auth directly with username and password...
"Justin Patrin" <papercrane@gmail.com> schrieb im Newsbeitrag
news:432beae04120611207183f441@mail.gmail.com...
> 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