That depends on the way your passwords are encrypted. The following modification might work (if you use MySQL):
# -------------------------------------------------------------------
# This function returns 1 if the user/pass combo is valid, 0/undef
# otherwise.
#
my $args = shift;
my $table = $args->{Table};
return $DB->table($table)->select ( { Username => $args->{Username}, Password => $args->{Password} }, ['Username'] )->rows ||
$DB->table($table)->select ( { Username => $args->{Username}, Password => \"ENCRYPT('$args->{Password}')" }, ['Username'] )->rows;
}
Note that I didn't test the fix and that is slows down logging in....
Good luck, Jasper
http://www.bookings.org
Code:
sub auth_valid_user { # -------------------------------------------------------------------
# This function returns 1 if the user/pass combo is valid, 0/undef
# otherwise.
#
my $args = shift;
my $table = $args->{Table};
return $DB->table($table)->select ( { Username => $args->{Username}, Password => $args->{Password} }, ['Username'] )->rows ||
$DB->table($table)->select ( { Username => $args->{Username}, Password => \"ENCRYPT('$args->{Password}')" }, ['Username'] )->rows;
}
Note that I didn't test the fix and that is slows down logging in....
Good luck, Jasper
http://www.bookings.org