Example #1
0
 protected function action()
 {
     //Logout Utente
     $msg = new SysMsg();
     Session::destroyObj(Session::UTENTE);
     Session::setObj(Session::SYSMSG, $msg->setMessage("Logout eseguito correttamente.")->setType(SysMsg::MSG_OK));
     //***
     $this->redirect = "user/message";
 }
Example #2
0
 protected function action()
 {
     //Autenticazione Utente
     $msg = new SysMsg();
     $user = new Utente(Session::getObj(Session::NETWORKER)->getId());
     $user->setNome(filter_var(ucfirst($_POST['nome']), FILTER_SANITIZE_STRING));
     $user->setCognome(filter_var(ucfirst($_POST['cognome']), FILTER_SANITIZE_STRING));
     $user->setEmail(filter_var($_POST['email'], FILTER_SANITIZE_STRING));
     $user->setUsername(filter_var($_POST['username'], FILTER_SANITIZE_STRING));
     $user->setPassword(filter_var($_POST['password'], FILTER_SANITIZE_STRING));
     $user->update() ? Session::setObj(Session::SYSMSG, $msg->setMessage("Utente aggiornato correttamente.")->setType(SysMsg::MSG_OK)) : Session::setObj(Session::SYSMSG, $msg->setMessage("Aggiornamento utente fallito.")->setType(SysMsg::MSG_CRITICAL));
     //***
     Session::destroyObj(Session::NETWORKER);
     $this->redirect = "user/fancymessage";
 }
Example #3
0
 public function logout()
 {
     Session::destroyObj(Session::UTENTE);
 }