application/controllers/Users.php
/*DOCU This function is triggered when the clicks the edit user info. 
	Checks if the entered fields are valid, alerts the user for any error on the form
	Owner:Philip */
DOCU This function is triggered when the clicks the edit user info.
Checks if the entered fields are valid, alerts the user for any error on the form
Owner:Philip
DOCU This function is triggered when the clicks the edit user info . Checks if the entered fields are valid alerts the user for any error on the form Owner : Philip
public function edit_info() {
		$this->form_validation->set_rules("email", "Email", "required|valid_email");
		$this->form_validation->set_rules("first_name", "First name", "required");
		$this->form_validation->set_rules("last_name", "Last name", "required");
		if ($this->form_validation->run() == FALSE) {
			$this->edit($this->input->post("id"));
		}
		else {
			$data = array(
				"id" => $this->input->post("id"),
				"email" => $this->input->post("email"),
				"first_name" => $this->input->post("first_name"),
				"last_name" => $this->input->post("last_name"),
				"user_level" => $this->input->post("user_level")
			);
			$this->user->update_user($data);
			$this->session->set_flashdata("info_success", "User successfully updated");
			redirect("admin");
		}
	}
public function edit_info ( ) { $ this -> form_validation -> set_rules ( " email " , " Email " , " required|valid_email " ) ; $ this -> form_validation -> set_rules ( " first_name " , " First name " , " required " ) ; $ this -> form_validation -> set_rules ( " last_name " , " Last name " , " required " ) ; if ( $ this -> form_validation -> run ( ) == FALSE ) { $ this -> edit ( $ this -> input -> post ( " id " ) ) ; } else { $ data = array ( " id " => $ this -> input -> post ( " id " ) , " email " => $ this -> input -> post ( " email " ) , " first_name " => $ this -> input -> post ( " first_name " ) , " last_name " => $ this -> input -> post ( " last_name " ) , " user_level " => $ this -> input -> post ( " user_level " ) ) ; $ this -> user -> update_user ( $ data ) ; $ this -> session -> set_flashdata ( " info_success " , " User successfully updated " ) ; redirect ( " admin " ) ; } }
DOCU This function is triggered when the clicks the edit user info.
DOCU This function is triggered when the clicks the edit user info .