Example #1
0
 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();
     }
 }
Example #3
0
 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');
 }
Example #4
0
 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();
     }
 }
Example #5
0
 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();
     }
 }
Example #6
0
 private function loadUser()
 {
     $this->user = Session::verifySession($this);
 }
Example #7
0
 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");
 }
Example #8
0
 public function post()
 {
     Session::verifySession();
     $this->save();
 }