diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-10-21 08:31:24 -0700 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-10-21 08:31:24 -0700 |
commit | 1ba1628ed6d22833096049ca9975c3d72f99804c (patch) | |
tree | 9a4ede0de3ac8494f206b07e2fc5e4013e61d234 /inc/poche/Database.class.php | |
parent | c1e24b0461111affb121f5a1bc9d42acf94caf93 (diff) | |
parent | 027b4e156853b4d5e358e19e83506ec4446de7ab (diff) | |
download | wallabag-1ba1628ed6d22833096049ca9975c3d72f99804c.tar.gz wallabag-1ba1628ed6d22833096049ca9975c3d72f99804c.tar.zst wallabag-1ba1628ed6d22833096049ca9975c3d72f99804c.zip |
Merge pull request #285 from dsacchet/dev
Adding support for http_auth
Diffstat (limited to 'inc/poche/Database.class.php')
-rw-r--r-- | inc/poche/Database.class.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 5c40b026..1d3ff0c2 100644 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php | |||
@@ -87,6 +87,17 @@ class Database { | |||
87 | return $user_config; | 87 | return $user_config; |
88 | } | 88 | } |
89 | 89 | ||
90 | public function userExists($username) { | ||
91 | $sql = "SELECT * FROM users WHERE username=?"; | ||
92 | $query = $this->executeQuery($sql, array($username)); | ||
93 | $login = $query->fetchAll(); | ||
94 | if (isset($login[0])) { | ||
95 | return true; | ||
96 | } else { | ||
97 | return false; | ||
98 | } | ||
99 | } | ||
100 | |||
90 | public function login($username, $password) { | 101 | public function login($username, $password) { |
91 | $sql = "SELECT * FROM users WHERE username=? AND password=?"; | 102 | $sql = "SELECT * FROM users WHERE username=? AND password=?"; |
92 | $query = $this->executeQuery($sql, array($username, $password)); | 103 | $query = $this->executeQuery($sql, array($username, $password)); |