From f29bb8688c02325196d7d5bd03fc528414f3055f Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Thu, 9 Apr 2020 20:19:37 +0200 Subject: connect using user and password close #70 --- app/class/Controllerconnect.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/class/Controllerconnect.php') diff --git a/app/class/Controllerconnect.php b/app/class/Controllerconnect.php index e9af86a..8555e92 100644 --- a/app/class/Controllerconnect.php +++ b/app/class/Controllerconnect.php @@ -36,8 +36,8 @@ class Controllerconnect extends Controller public function login($route, $id = null) { - if (isset($_POST['pass'])) { - $this->user = $this->usermanager->passwordcheck($_POST['pass']); + if (!empty($_POST['pass']) && !empty($_POST['user'])) { + $this->user = $this->usermanager->passwordcheck($_POST['user'], $_POST['pass']); if ($this->user != false) { if ($this->user->expiredate() === false || $this->user->level() === 10 || $this->user->expiredate('date') > $this->now) { $this->user->connectcounter(); -- cgit v1.2.3