From 91bdf6aaf3cda52a43c35ce22f5e25537684cb56 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 27 Nov 2015 16:24:21 -0500 Subject: Add generic authorization class --- app/Auth/Database.php | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 app/Auth/Database.php (limited to 'app/Auth') diff --git a/app/Auth/Database.php b/app/Auth/Database.php deleted file mode 100644 index c2041d4d..00000000 --- a/app/Auth/Database.php +++ /dev/null @@ -1,49 +0,0 @@ -db - ->table(User::TABLE) - ->eq('username', $username) - ->eq('disable_login_form', 0) - ->eq('is_ldap_user', 0) - ->findOne(); - - if (is_array($user) && password_verify($password, $user['password'])) { - $this->userSession->initialize($user); - $this->container['dispatcher']->dispatch('auth.success', new AuthEvent(self::AUTH_NAME, $user['id'])); - return true; - } - - return false; - } -} -- cgit v1.2.3