This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Hi,
¿ somebody knows how make that $2 (the password) will be compared against the database but in form of eq{$2} and if it fails, then compared as crypteq{$2} ?
Of course, all of this in the same authenticator.... mybe using OR ....I don't know. Any idea will be appreciated.
This is working fine:
fixed_login:
driver = plaintext
public_name = LOGIN
server_prompts = Username:: : Password::
server_condition = "${if and { \
{!eq{$1}{}} \
{!eq{$2}{}} \
{eq{$2}{${lookup mysql{SELECT password FROM users \
WHERE username='${local_part:$1}' \
AND domainname='${domain:$1}'}{$value}fail}}} \
} {yes}{no}}"
server_set_id = $1
And my wish is have something like "{eq{$2}{${lookup mysql{SELECT password FROM users WHERE username='${local_part:$1}' AND
domainname='${domain:$1}'}{$value} OR {crypteq{$2}{${lookup mysql{SELECT password FROM users WHERE username='${local_part:$1}' AND
domainname='${domain:$1}'}{$value}fail}}} } {yes}{no}}"
Guillermo
--