6 messages in net.sourceforge.lists.courier-users[courier-users] Re: Help with a login...
FromSent OnAttachments
Marcio MerloneOct 23, 2002 6:31 am 
Sam VarshavchikOct 23, 2002 3:16 pm 
Marcio MerloneOct 24, 2002 6:06 am 
Bill MichellOct 24, 2002 6:36 am 
Marcio MerloneOct 24, 2002 8:48 am 
Tim HunterOct 24, 2002 10:14 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Re: Help with a login issue (migration from sendmail)Actions...
From:Bill Michell (bi@mics.org.uk)
Date:Oct 24, 2002 6:36:48 am
List:net.sourceforge.lists.courier-users

Marcio Merlone writes:

Sam Varshavchik wrote:

Marcio Merlone writes:

My question is if there is a way to make users login using either their id (xpto123) OR address (fo@bar.com). I notice that the mysql query sent by courier is something like this:

SELECT id, crypt, "", uid, gid, home, maildir, quota, name FROM users WHERE id = "xpto123"

It should be something like this:

SELECT id, crypt, "", uid, gid, home, maildir, quota, name FROM users WHERE id = "xpto123" OR address='xpto123'

Insert two records into users, identical in all ways except the id field.

This is an option but excuse me, looks ugly and one more administrative nigthmare. But is still an idea.

Don't know enough about MySQL to be sure, but could you do something like this with a database view or query? Convert a single record in the underlying table into two rows in the returned results, one with the id and the other with the address? Of course, this might be a little inefficient...