$this->printDebug("The username provided doesn't match the username on the smartcard. The user is probably trying to log in to the smartcard domain with password authentication. Denying access.",2);
returnfalse;
}
//We need to ensure that if we require a password, that it is
//not blank. We don't allow blank passwords, so we are being
//tricked if someone is supplying one when using password auth.
//Smartcard authentication uses a pin, and does not require
//a password to be given; a blank password here is wanted.
if(''==$password&&!$this->useSmartcardAuth()){
$this->printDebug("User used a blank password",1);
returnfalse;
}
$ldapconn=$this->connect();
if($ldapconn){
$this->printDebug("Connected successfully",1);
//Mediawiki munges the username before authenticate is called,
//this can mess with authentication, group pulling/restriction,
//preference pulling, etc. Let's allow the user to use