my ( $dbh, $userid, $password, $query ) = @_;
if ($ldap) {
$debug and print "## checkpw - checking LDAP\n";
- my ($retval,$retcard) = checkpw_ldap(@_); # EXTERNAL AUTH
- ($retval) and return ($retval,$retcard);
+ my ($retval,$retcard,$retuserid) = checkpw_ldap(@_); # EXTERNAL AUTH
+ ($retval) and return ($retval,$retcard,$retuserid);
}
- if ($cas && $query->param('ticket')) {
+ if ($cas && $query && $query->param('ticket')) {
$debug and print STDERR "## checkpw - checking CAS\n";
# In case of a CAS authentication, we use the ticket instead of the password
my $ticket = $query->param('ticket');