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_password() {
		$this->form_validation->set_rules("password", "Password", "required|min_length[6]|matches[confirm]");
		$this->form_validation->set_rules("confirm", "Confirm password", "required|matches[password]");
		if ($this->form_validation->run() == FALSE) {
			$this->edit($this->input->post("id"));
		}
		else {
			$password = $this->input->post("password");
			$enc_password = md5($password);
			$data = array(
				"id" => $this->input->post("id"),
				"password" => $enc_password
			);
			$this->user->update_password($data);
			$this->session->set_flashdata("info_success", "Password update successful");
			redirect("admin");
		}
	}
public function edit_password ( ) { $ this -> form_validation -> set_rules ( " password " , " Password " , " required|min_length[6]|matches[confirm] " ) ; $ this -> form_validation -> set_rules ( " confirm " , " Confirm password " , " required|matches[password] " ) ; if ( $ this -> form_validation -> run ( ) == FALSE ) { $ this -> edit ( $ this -> input -> post ( " id " ) ) ; } else { $ password = $ this -> input -> post ( " password " ) ; $ enc_password = md5 ( $ password ) ; $ data = array ( " id " => $ this -> input -> post ( " id " ) , " password " => $ enc_password ) ; $ this -> user -> update_password ( $ data ) ; $ this -> session -> set_flashdata ( " info_success " , " Password update successful " ) ; 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 .