Exemplo n.º 1
0
 public function update()
 {
     $model = new Login_Model();
     if ($model->on_update_email_check()) {
         $this->view->styles = array();
         array_push($this->view->styles, URL . "/Public/bootstrap/css/styles.css");
         array_push($this->view->styles, URL . "/Public/bootstrap/css/post.css");
         echo '</br></br></br><h1>email already exists</h1>';
         $this->view->user = $this->getUser(Session::get('id'));
         $this->view->render('login/edit_profile', 1);
         exit;
     }
     $x = $model->update();
     if ($x) {
         header('Location: ' . URL . '/post/index');
         exit;
     } else {
         echo 'error in profile edit';
     }
 }