application/controllers/Users.php
/*DOCU This function is triggered when user the clicks the save user description. 
	Checks if the textarea is not empty
	Owner:Philip */
DOCU This function is triggered when user the clicks the save user description.
Checks if the textarea is not empty
Owner:Philip
DOCU This function is triggered when user the clicks the save user description . Checks if the textarea is not empty Owner : Philip
public function save_description() {
		$this->form_validation->set_rules("description", "Description", "required");
		if ($this->form_validation->run() == FALSE) {
			$this->edit_user($this->input->post("id"));
		}
		else {
			$data = array(
				"id" => $this->input->post("id"),
				"description" => $this->input->post("description")
			);
			$this->user->save_description($data);
			$this->session->set_flashdata("info_success", "Description successfully updated");
			redirect("users/user_dashboard");
		}
	}
public function save_description ( ) { $ this -> form_validation -> set_rules ( " description " , " Description " , " required " ) ; if ( $ this -> form_validation -> run ( ) == FALSE ) { $ this -> edit_user ( $ this -> input -> post ( " id " ) ) ; } else { $ data = array ( " id " => $ this -> input -> post ( " id " ) , " description " => $ this -> input -> post ( " description " ) ) ; $ this -> user -> save_description ( $ data ) ; $ this -> session -> set_flashdata ( " info_success " , " Description successfully updated " ) ; redirect ( " users/user_dashboard " ) ; } }
DOCU This function is triggered when user the clicks the save user description.
DOCU This function is triggered when user the clicks the save user description .