public function idExists($userId)
 {
     $app = getApp();
     $sql = "SELECT " . $app->getConfig('security_id_property') . " FROM " . $app->getConfig('security_user_table') . " WHERE " . $app->getConfig('security_id_property') . " = :userId LIMIT 1";
     $dbh = \W\Manager\ConnectionManager::getDbh();
     $sth = $dbh->prepare($sql);
     $sth->bindValue(":userId", $userId);
     if ($sth->execute()) {
         $foundUser = $sth->fetch();
         if ($foundUser) {
             return true;
         }
     }
     return false;
 }
Esempio n. 2
0
	public function __construct() {
		// récupération du singleton de connexion
		$this->dbh = \W\Manager\ConnectionManager::getDbh();
	}
Esempio n. 3
0
 public function __construct()
 {
     $this->table = 'books_keywords';
     $this->dbh = ConnectionManager::getDbh();
 }
 public function __construct()
 {
     $this->dbh = \W\Manager\ConnectionManager::getDbh();
 }
Esempio n. 5
0
 public function __construct()
 {
     $this->table = 'cart_to_books';
     $this->dbh = ConnectionManager::getDbh();
 }
Esempio n. 6
0
	public function lastID() {
		$dbh = \W\Manager\ConnectionManager::getDbh();
		return $dbh->lastInsertId();
	}	
Esempio n. 7
0
 public function __construct()
 {
     $this->table = 'paniers_bds';
     $this->dbh = ConnectionManager::getDbh();
 }