diff --git a/modules/core/www/loginuserpassorg.php b/modules/core/www/loginuserpassorg.php
index 295650dcd7bbe4444eb3ed6aaad89dc4f4633317..44f5d39c91cdec5e5475345d5fbe3e8396ffabd3 100644
--- a/modules/core/www/loginuserpassorg.php
+++ b/modules/core/www/loginuserpassorg.php
@@ -66,7 +66,7 @@ if (isset($state['error'])) {
     $queryParams = ['AuthState' => $authStateId];
 }
 
-if ($organizations === null || !empty($organization)) {
+if ($organizations === null || $organization !== '') {
     if (!empty($username) || !empty($password)) {
         if ($source->getRememberUsernameEnabled()) {
             $sessionHandler = \SimpleSAML\SessionHandler::getSessionHandler();