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;
 }
示例#2
0
	public function __construct() {
		// récupération du singleton de connexion
		$this->dbh = \W\Manager\ConnectionManager::getDbh();
	}
示例#3
0
 public function __construct()
 {
     $this->table = 'books_keywords';
     $this->dbh = ConnectionManager::getDbh();
 }
 public function __construct()
 {
     $this->dbh = \W\Manager\ConnectionManager::getDbh();
 }
示例#5
0
 public function __construct()
 {
     $this->table = 'cart_to_books';
     $this->dbh = ConnectionManager::getDbh();
 }
示例#6
0
	public function lastID() {
		$dbh = \W\Manager\ConnectionManager::getDbh();
		return $dbh->lastInsertId();
	}	
示例#7
0
 public function __construct()
 {
     $this->table = 'paniers_bds';
     $this->dbh = ConnectionManager::getDbh();
 }