aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Database.class.php
diff options
context:
space:
mode:
authorMaryana Rozhankivska <mariroz@mr.lviv.ua>2014-01-30 16:35:31 +0200
committerMaryana Rozhankivska <mariroz@mr.lviv.ua>2014-01-30 16:35:31 +0200
commit6af66b1106e67a8dc467a70e8e57d7963b09936b (patch)
treeb613295c180469e2643a982195ff409ef86b4dbc /inc/poche/Database.class.php
parentf4fbfaa7cbaaf07aae7d8f0533d293fa4dc605cc (diff)
downloadwallabag-6af66b1106e67a8dc467a70e8e57d7963b09936b.tar.gz
wallabag-6af66b1106e67a8dc467a70e8e57d7963b09936b.tar.zst
wallabag-6af66b1106e67a8dc467a70e8e57d7963b09936b.zip
fix of bug #368 Endless redirects or user doesn't exist with basic authentication
Diffstat (limited to 'inc/poche/Database.class.php')
-rw-r--r--inc/poche/Database.class.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index 3b0f455e..0457af69 100644
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -165,9 +165,14 @@ class Database {
165 } 165 }
166 } 166 }
167 167
168 public function login($username, $password) { 168 public function login($username, $password, $isauthenticated=false) {
169 $sql = "SELECT * FROM users WHERE username=? AND password=?"; 169 if ($isauthenticated) {
170 $query = $this->executeQuery($sql, array($username, $password)); 170 $sql = "SELECT * FROM users WHERE username=?";
171 $query = $this->executeQuery($sql, array($username));
172 } else {
173 $sql = "SELECT * FROM users WHERE username=? AND password=?";
174 $query = $this->executeQuery($sql, array($username, $password));
175 }
171 $login = $query->fetchAll(); 176 $login = $query->fetchAll();
172 177
173 $user = array(); 178 $user = array();