From f0a6ee8278efb74d8de36a35782b9f0d919b45a6 Mon Sep 17 00:00:00 2001 From: Sebastian Schendel Date: Tue, 28 Feb 2023 23:09:29 +0100 Subject: [PATCH] Bugfix username- & email-login combination --- AppApi.module.php | 2 +- classes/Auth.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AppApi.module.php b/AppApi.module.php index 590320e..0c01de3 100644 --- a/AppApi.module.php +++ b/AppApi.module.php @@ -24,7 +24,7 @@ public static function getModuleInfo() { return [ 'title' => 'AppApi', 'summary' => 'Module to create a REST API with ProcessWire', - 'version' => '1.2.8', + 'version' => '1.2.9', 'author' => 'Sebastian Schendel', 'icon' => 'terminal', 'href' => 'https://modules.processwire.com/modules/app-api/', diff --git a/classes/Auth.php b/classes/Auth.php index ddb3d1b..580b480 100644 --- a/classes/Auth.php +++ b/classes/Auth.php @@ -135,7 +135,7 @@ public function ___doLogin($data) { } if ( - !$loggedIn && + (!$user || !$user->id) && in_array($accessMethod, ['email-password', 'any-password']) && in_array('logintypeEmailPassword', $allowedLoginTypes) ) {