public function __construct() { if ($_SESSION['session']->getLogin()) { parent::__construct($_SESSION['session']->getUserName()); $this->assignUserVars(); $this->draw(); } else { throw new Error403Exception(); } }
public function __construct($username) { if ($_SESSION['session']->getLogin()) { try { parent::__construct($username); } catch (UserExistiertNichtException $e) { throw new Error404Exception(); } $this->draw(); } else { throw new Error403Exception(); } }