From 0785551e726b77eb3e5a530cbd343bf351738b7c Mon Sep 17 00:00:00 2001
From: Olimpia Magliulo <olimpiam@intern-ikts-MacBook-Air.local>
Date: Thu, 9 Nov 2017 16:32:53 +0100
Subject: [PATCH] Show login error in loginuserpassorg

The error is shown also if just one of the fields (user or password) is empty.
---
 modules/core/www/loginuserpassorg.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/core/www/loginuserpassorg.php b/modules/core/www/loginuserpassorg.php
index 81deccf83..a0931f79b 100644
--- a/modules/core/www/loginuserpassorg.php
+++ b/modules/core/www/loginuserpassorg.php
@@ -50,7 +50,7 @@ if (array_key_exists('organization', $_REQUEST)) {
 $errorCode = NULL;
 $errorParams = NULL;
 if ($organizations === NULL || !empty($organization)) {
-	if (!empty($username) && !empty($password)) {
+	if (!empty($username) || !empty($password)) {
 
 		if ($source->getRememberUsernameEnabled()) {
 			$sessionHandler = \SimpleSAML\SessionHandler::getSessionHandler();
-- 
GitLab