From f38005aea2e00a4b2ee9cd293ec5faf4b77a97fe Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 22 Sep 2011 14:35:53 +0000 Subject: [PATCH] Fix: add error for login method --- htdocs/lib/ws.lib.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/lib/ws.lib.php b/htdocs/lib/ws.lib.php index 468ed4c2bcd..82ecf7805c6 100755 --- a/htdocs/lib/ws.lib.php +++ b/htdocs/lib/ws.lib.php @@ -55,13 +55,15 @@ function check_authentication($authentication,&$error,&$errorcode,&$errorlabel) // Validation of login with a third party login module method if (! $error) { - $test=true; if (is_array($conf->login_method_modules) && !empty($conf->login_method_modules)) { $login = getLoginMethod($authentication['login'],$authentication['password'],$authentication['entity']); - if ($login) $test=false; + if (empty($login)) $error++; + } + else + { + $errorcode='BAD_LOGIN_METHOD'; $errorlabel='Bad value for login method'; } - if ($test) $error++; } if ($error)