Tom Sommer wrote:
Timo Sirainen wrote:
On Thu, 2005-10-27 at 17:02 +0200, Jakob Hirsch wrote:
Maybe it would be even better/cleaner to be able to use something like
SELECT userid AS user, 1 AS password_ok FROM users WHERE userid = '%u' AND password = PASSWORD('%p')
Actually I think this already works:
SELECT userid AS user, NULL as password WHERE userid = '%u' AND password = PASSWORD('%p')
NULL passwords accept any password. This was needed for proxying but works nicely elsewhere too.
Excellent, I will try this
This doesn't seem to work, it executes:
SELECT username as user, NULL as password FROM users WHERE username = 'test@example.com' AND password = PASSWORD('0')
... where password_query is: ...
SELECT username as user, NULL as password FROM users WHERE username = '%u' AND password = PASSWORD('%p')
... and ...
default_pass_scheme = PLAIN
-- Tom Sommer