Add anual report feature
This commit is contained in:
@@ -101,6 +101,28 @@ class UserModel extends CI_Model
|
||||
return $this->db->update($this->_table, $this, array('id_user' => $id_pemilik));
|
||||
}
|
||||
|
||||
public function selfUpdate($id_pemilik,$foto_user)
|
||||
{
|
||||
$post = $this->input->post();
|
||||
$this->alamat_user = $post["alamat"];
|
||||
if($post['kelurahan']!=='luar'){
|
||||
$kelurahan = $post['kelurahan'];
|
||||
$kecamatan = $this->KelurahanModel->getKecamatanByKelurahan($post['kelurahan']);
|
||||
$kota = 'Kota Magelang';
|
||||
} else {
|
||||
$kelurahan = 'Luar Kota Magelang';
|
||||
$kecamatan = 'Luar Kota Magelang';
|
||||
$kota = 'Luar Kota Magelang';
|
||||
}
|
||||
$this->kelurahan_user = $kelurahan;
|
||||
$this->kecamatan_user = $kecamatan;
|
||||
$this->kota_user = $kota;
|
||||
$this->telp_user = $post["telp"];
|
||||
$this->npwp = $post["npwp"];
|
||||
$this->foto_user = $foto_user;
|
||||
return $this->db->update($this->_table, $this, array('id_user' => $id_pemilik));
|
||||
}
|
||||
|
||||
public function resetPassword($id_user)
|
||||
{
|
||||
$post = $this->input->post();
|
||||
|
||||
Reference in New Issue
Block a user