aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Database.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-10-22 08:51:30 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-10-22 08:51:30 +0200
commitb6d859fa927be8e60752ea44d682401b10671dfa (patch)
tree3900bacab453cc7f3e5f6c742aea151abc453d3c /inc/poche/Database.class.php
parent1a0d776394d7e10b5e017f00d3626e3de6ba3688 (diff)
parent1ba1628ed6d22833096049ca9975c3d72f99804c (diff)
downloadwallabag-b6d859fa927be8e60752ea44d682401b10671dfa.tar.gz
wallabag-b6d859fa927be8e60752ea44d682401b10671dfa.tar.zst
wallabag-b6d859fa927be8e60752ea44d682401b10671dfa.zip
Merge branch 'dev' of https://github.com/inthepoche/poche into dev
Diffstat (limited to 'inc/poche/Database.class.php')
-rw-r--r--inc/poche/Database.class.php11
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));