diff --git a/www/auth/login-ldapmulti.php b/www/auth/login-ldapmulti.php
index 147152d2f70ecad12b8553172676f7b14259be01..f5a35845af476b45499e95567f1ef1ed1d83ceb9 100644
--- a/www/auth/login-ldapmulti.php
+++ b/www/auth/login-ldapmulti.php
@@ -45,7 +45,7 @@ if (isset($_POST['username'])) {
 	
 		$ldap = new SimpleSAML_Auth_LDAP($ldapconfig['hostname'], $ldapconfig['enable_tls']);
 		
-		if (!$ldap->bind($dn, $pwd)) {
+		if (($pwd == "") or (!$ldap->bind($dn, $pwd))) {
 			SimpleSAML_Logger::info('AUTH - ldap-multi: '. $_POST['username'] . ' failed to authenticate. DN=' . $dn);
 			throw new Exception('Wrong username or password');
 		}