##// END OF EJS Templates
revisando y reduciendo codigo del controlador y del modelo
arturo -
r1:2
parent child
Show More
@@ -608,17 +608,20
608 } No newline at end of file
608 }
609 No newline at end of file
609
610 public function updateUser(){
610 public function updateUser(){
No newline at end of file
611 require 'components'.DS.'com_users'.DS.'models'.DS.'UsersModel.php';
611 require 'models/UsersModel.php';
No newline at end of file
No newline at end of file
612
612
No newline at end of file
No newline at end of file
613 $user = new UsersModel();
613 $user = new UsersModel();
No newline at end of file
No newline at end of file
614 $iduser = $_POST['iduser'];
614 $iduser = $_REQUEST['iduser'];
No newline at end of file
No newline at end of file
615 $datos['firstname'] = $_POST['firstname'];
615 $firstname = $_REQUEST['firstname'];
No newline at end of file
No newline at end of file
616 $datos['lastname'] = $_POST['lastname'];
616 $lastname = $_REQUEST['lastname'];
No newline at end of file
No newline at end of file
617 $datos['state'] = $_POST['state'];
617 $state = $_REQUEST['state'];
No newline at end of file
No newline at end of file
618
618 $edituser = $user->updateUser($iduser, $firstname, $lastname, $state);
No newline at end of file
No newline at end of file
619 $user->setIdValue($iduser);
619
No newline at end of file
No newline at end of file
620 list($result, $message) = $user->UpdateItem($datos);
620 $data['url'] = '?controller=Users&action=getUsers';
No newline at end of file
No newline at end of file
621
621 $this->view->show("actualizar.php", $data); No newline at end of file
No newline at end of file
622 $url = 'index.php?option=com_users&controller=Users&action=dolist';
No newline at end of file
623 header("location: ".$url);
No newline at end of file
624 exit(); No newline at end of file
622 } No newline at end of file
625 }
623 No newline at end of file
626
624 public function remove(){ No newline at end of file
627 public function remove(){
General Comments 0
You need to be logged in to leave comments. Login now