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