public function verifAuthentificationExists() { session_start(); if ($_SESSION[$this->session_name]) { $this->setEnableContent(true); return true; } if ($_POST['user'] && $_POST['pwd']) { $model = new Model(); $name = $model->credentials(); if ($name && !$_SESSION[$this->session_name]) { $this->createSession(); } else { $this->throwAuthentificationForm(); } } else { $this->throwAuthentificationForm(); } }