public function __construct() { if ($_SESSION['ID'] != null) { header('Location:/user'); } parent::__construct(); $this->users = array(); $sql = 'SELECT * FROM USERS'; $stmt = $this->pdo->query($sql); while ($rep = $stmt->fetch()) { $user = build_user($rep['ID']); array_push($this->users, $user); } }
public function __construct() { parent::__construct(); if ($_SESSION['ID'] == null) { header('Location:/'); } else { if ($_SESSION['admin'] == "admin") { header('Location:/admin'); } else { $this->user = build_user($_SESSION['ID']); $this->user->initializeFriends(); $this->user->initializeCategories(); $this->user->initializeFlux(); $this->user->initializeArticles(); $this->user->initializeMailBox(); $this->user->initializeTwitter(); } } }
public function __construct() { parent::__construct(); }
public function select_user_by_mail() { parent::change_option("WHERE EMAIL = ?"); }