mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Adding support for http_auth
This commit is contained in:
parent
df6afaf090
commit
027b4e1568
3 changed files with 23 additions and 2 deletions
|
@ -87,6 +87,17 @@ class Database {
|
|||
return $user_config;
|
||||
}
|
||||
|
||||
public function userExists($username) {
|
||||
$sql = "SELECT * FROM users WHERE username=?";
|
||||
$query = $this->executeQuery($sql, array($username));
|
||||
$login = $query->fetchAll();
|
||||
if (isset($login[0])) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function login($username, $password) {
|
||||
$sql = "SELECT * FROM users WHERE username=? AND password=?";
|
||||
$query = $this->executeQuery($sql, array($username, $password));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue