public function get() { Session::verifySession(); // Completely clear and remove session session_unset(); session_destroy(); // Render the view $this->view->setMainTemplate('PageTemplate'); $this->renderView('LogoutView'); }
public function post() { Session::verifySession(); // Validate the form and get errors if ($errors = $this->validateForm()) { // There were errors, so redisplay form with errors $this->view->errors = $errors; $this->get(); } else { $this->changePassword(); } }
public function get() { Session::verifySession(); // Verify user is an administrator - site admins have the root dir as their userPath if ($_SESSION['userPath'] != '') { // Not an admin, so scram - don't even let on that this page exists! header("Location:/manage/welcome"); } // Generate the user data and make it available to the view $userData = $this->getUserData(); $this->view->userData = $userData; // Render the view $this->view->setMainTemplate('PageTemplate'); $this->renderView('UserMgmtView'); }
public function post() { Session::verifySession(); // If user does not have advanced folder rights, send them away if ($_SESSION['directoryMode'] != 'ADVANCED') { header('Location:/manage/welcome'); } // Validate the form and get errors if ($errors = $this->validateForm()) { // There were errors, so redisplay form with errors $this->view->errors = $errors; $this->get(); } else { $this->createNewFolder(); } }
public function post() { Session::verifySession(); // Verify user is an administrator - site admins have the root dir as their userPath if ($_SESSION['userPath'] != '') { // Not an admin, so scram - don't even let on that this page exists! header("Location:/manage/welcome"); } // Validate the form and get errors if ($errors = $this->validateForm()) { // There were errors, so redisplay form with errors $this->view->errors = $errors; $this->get(); } else { $this->updateUser(); } }
private function loadUser() { $this->user = Session::verifySession($this); }
public function deletePage() { Session::verifySession(); // Remove the page & its meta file $currentPageName = $this->pageState['page']; unlink(File::getUserSandboxPath() . $currentPageName . '.html'); @unlink(File::getUserSandboxPath() . $currentPageName . '.config'); // Then return to the Welcome page header("Location:/manage/welcome"); }
public function post() { Session::verifySession(); $this->save(); }