ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PDO.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\DAV\Auth\Backend;
4 
12 class PDO extends AbstractDigest {
13 
19  protected $pdo;
20 
26  public $tableName = 'users';
27 
28 
36  function __construct(\PDO $pdo) {
37 
38  $this->pdo = $pdo;
39 
40  }
41 
49  function getDigestHash($realm, $username) {
50 
51  $stmt = $this->pdo->prepare('SELECT digesta1 FROM ' . $this->tableName . ' WHERE username = ?');
52  $stmt->execute([$username]);
53  return $stmt->fetchColumn() ?: null;
54 
55  }
56 
57 }
$stmt
__construct(\PDO $pdo)
Creates the backend object.
Definition: PDO.php:36
HTTP Digest authentication backend class.
getDigestHash($realm, $username)
Returns the digest hash for a user.
Definition: PDO.php:49