diff --git a/core/authentication/resources/classes/plugins/database.php b/core/authentication/resources/classes/plugins/database.php index 5e25b8a512..6f9805c679 100644 --- a/core/authentication/resources/classes/plugins/database.php +++ b/core/authentication/resources/classes/plugins/database.php @@ -170,7 +170,7 @@ class plugin_database { $sql .= "u.user_email, u.salt, u.api_key, u.domain_uuid, d.domain_name "; $sql .= "from v_users as u, v_domains as d "; $sql .= "where u.domain_uuid = d.domain_uuid "; - $sql .= "and user_type = 'default' "; + $sql .= "and (user_type = 'default' or user_type is null) "; if (isset($this->key) && strlen($this->key) > 30) { $sql .= "and u.api_key = :api_key "; $parameters['api_key'] = $this->key; diff --git a/core/authentication/resources/classes/plugins/email.php b/core/authentication/resources/classes/plugins/email.php index 7596ceb540..eb464e6363 100644 --- a/core/authentication/resources/classes/plugins/email.php +++ b/core/authentication/resources/classes/plugins/email.php @@ -132,7 +132,7 @@ class plugin_email { $sql .= "and domain_uuid = :domain_uuid "; $parameters['domain_uuid'] = $_SESSION["domain_uuid"]; } - $sql .= "and user_type = 'default' "; + $sql .= "and (user_type = 'default' or user_type is null) "; $parameters['username'] = $_REQUEST['username']; $database = new database; $row = $database->select($sql, $parameters, 'row'); diff --git a/core/authentication/resources/classes/plugins/ldap.php b/core/authentication/resources/classes/plugins/ldap.php index 4c2cc38b90..d61fc5dec9 100644 --- a/core/authentication/resources/classes/plugins/ldap.php +++ b/core/authentication/resources/classes/plugins/ldap.php @@ -131,7 +131,7 @@ class plugin_ldap { $sql .= "and domain_uuid = :domain_uuid "; $parameters['domain_uuid'] = $this->domain_uuid; } - $sql .= "and user_type = 'default' "; + $sql .= "and (user_type = 'default' or user_type is null) "; $parameters['username'] = $this->username; $database = new database; $row = $database->select($sql, $parameters, 'row'); diff --git a/core/authentication/resources/classes/plugins/totp.php b/core/authentication/resources/classes/plugins/totp.php index ae44f572f1..22927d522c 100644 --- a/core/authentication/resources/classes/plugins/totp.php +++ b/core/authentication/resources/classes/plugins/totp.php @@ -149,7 +149,7 @@ class plugin_totp { $sql .= "and domain_uuid = :domain_uuid "; $parameters['domain_uuid'] = $this->domain_uuid; } - $sql .= "and user_type = 'default' "; + $sql .= "and (user_type = 'default' or user_type is null) "; $parameters['username'] = $this->username; $database = new database; $row = $database->select($sql, $parameters, 'row');