#11 CHANGE PASSWORD – Membuat Sistem Login Lengkap dengan CODEIGNITER 3

#11 CHANGE PASSWORD  - Membuat Sistem Login Lengkap dengan CODEIGNITER 3

#11 CHANGE PASSWORD – Membuat Sistem Login Lengkap dengan CODEIGNITER 3

Di video kali ini kita akan menambahkan fitur Ubah Password pada aplikasi login kita menggunakan CodeIgniter 3

#codeigniter #tutorial


LINK
CodeIgniter : https://codeigniter.com
SBAdmin 2 : https://startbootstrap.com/themes/sb-admin-2/
Bootstrap : https://getbootstrap.com/
Font Awesome : https://fontawesome.com/


Apa yang harus dipelajari sebelum ngikutin seri ini :

– PHP DASAR
https://www.youtube.com/playlist?list=PLFIM0718LjIUqXfmEIBE3-uzERZPh3vp6

– OOPHP
https://www.youtube.com/playlist?list=PLFIM0718LjIWvxxll-6wLXrC_16h_Bl_p

– PHP MVC
https://www.youtube.com/playlist?list=PLFIM0718LjIVEh_d-h5wAjsdv2W4SAtkx

– CodeIgniter
https://www.youtube.com/watch?v=dMRCZGGAx74&list=PLFIM0718LjIVpXbAwu_Cg9PdJO1GvyvCn&index=10

https://www.youtube.com/watch?v=g5JT3EW38KM&list=PLFIM0718LjIVpXbAwu_Cg9PdJO1GvyvCn&index=11

https://www.youtube.com/watch?v=r-r6IhsE5vg&list=PLFIM0718LjIVpXbAwu_Cg9PdJO1GvyvCn&index=12

PLAYLIST LAIN:

– HTML Dasar
https://www.youtube.com/playlist?list=PLFIM0718LjIVuONHysfOK0ZtiqUWvrx4F

– CSS Dasar
https://www.youtube.com/playlist?list=PLFIM0718LjIUBrbm6Gdh6k7ZUvPIAZm7p

– Tutorial Sublime Text
https://www.youtube.com/playlist?list=PLFIM0718LjIWE-Ot9V9qcALx5OMAZY67c

– CSS Layouting
https://www.youtube.com/playlist?list=PLFIM0718LjIUu4Ju9GUL5zpLcuq08TKYr


MEDIA SOSIAL

http://instagram.com/sandhikagalih
http://twitter.com/sandhikagalih
https://www.facebook.com/WebProgrammingUNPAS
http://codepen.io/webprogrammingunpas
https://github.com/webprogrammingunpas


UNIVERSITAS PASUNDAN BANDUNG
http://www.unpas.ac.id/
http://www.if.unpas.ac.id/

terimakasih dan selamat #ngoding!

@sandhikagalih
#11 CHANGE PASSWORD – Membuat Sistem Login Lengkap dengan CODEIGNITER 3



#11 CHANGE PASSWORD – Membuat Sistem Login Lengkap dengan CODEIGNITER 3

Related posts

24 Thoughts to “#11 CHANGE PASSWORD – Membuat Sistem Login Lengkap dengan CODEIGNITER 3

  1. Error di verify_hash

    Message: Call to undefined function verify_hash()

  2. gak terasa udah tutorial 12 aja, makin asyik ngodingnya. Berharap nih selanjutnya fitur chat realtimenya ditambahin di video selanjutnya. Aamiin 🙂

  3. mohon pencerahannya

    saya punya halaman admin menampilkan seluruh user , hanya menampilkan nama dan email dan di aksinya saya tambahin button detail dengan menampikan modal

    pas saya klik button detailnya keluar id dari masinng2
    tapi setelha di view yang keluar malah member id terakhir 🙁

  4. Problem: Password tidak dapat berubah, message : The Current Password field is required. The New Password field is required. The Repeat Password field is required. Mohon solusinya, kesalahannya di mana???

  5. Saya berhasil ganti passwordnya, cuma ketika saya mencoba untuk melakukan aksi yang sama untuk mengganti password kok tidak bisa ya ada notif wrong current password.. Logikanya kan current passwordnya yang baru berhasil dilakukan tadi, nah tapi kok wrong current password ya, ketika saya coba ketikan password yang lama sebelum diganti ke password yang baru juga notifnya sama.. Takut gabisa masuk ke admin setelah logout, mohon bantuannya 🙏

  6. Pak kok message nya pada program saya tdk mau muncul ya? Kira" salahnya dmna?

  7. Toogle sidebarnya tolong dicheck pa dika.

  8. Pak, pas diubah passwordnya sudah bisa, susah muncul pemberitahuan kalau password sudah terubah tapi pas saya coba login pake password baru tidak bisa, pake password lama pun tidak bisa, itu kenapa ya pak??

  9. kapan pak tutorial laravelnya ( ; ) ..???

  10. pak,saya coba buat menu untuk menampilkan My articel dan saya mau menampilkan data artikelnya dimana email di tabel user_articel harus sama dgn email di tabel user namun artikel di tabel user_articel tidak cuma satu data yg punya email yang serupa. pada saat saya ambil datanya pakai get_where() lalu saya var_dump() data yg ter ambil cuman data yang pertama saja. bagaimana cara yang tepat untuk mengatasi masalah itu, mohon bantuannya, sebelumnya saya ucapkan terimakasih. untuk link githubnya https://github.com/sultanarbai/tugaspeweb.git

  11. di auth kan ada syntax ini:

    public function __construct()
    {
    parent::__construct();
    $this->load->library('form_validation');
    }

    kalau syntax diatas dihapus tetap jalan karena sudah ada di autoload.
    yg ingin saya tau syntax itu untuk apa ya? atau bisa dilihat di playlist keberapa dan menit keberapa mengenai penjelasan syntax diatas?

  12. MHz

    Trims tutor nya Mas.. 4 thumbs up !!! 🙂

  13. Ajarin caranya crop image pake model dong pak, buat yg edit profilenya. Video" bapak sangat membantu hidup orang banyak, terima kasih pak

  14. pak maaf ini saya kok malah muncul alert wrong current password mulu ya pada saat change passwordnya padahal dicontroller user nya udah sama,

    controller User, function changePassword

    public function changePassword()

    {

    $data['title'] = 'Change Password';

    $data['user'] = $this->db->get_where('user', ['email' => $this->session->userdata('email')])->row_array();

    $this->form_validation->set_rules('current_password', 'Current Password', 'required|trim');

    $this->form_validation->set_rules('new_password1', 'New Password', 'required|trim|min_length[3]|matches[new_password2]');

    $this->form_validation->set_rules('new_password2', 'Confirm New Password', 'required|trim|min_length[3]|matches[new_password1]');

    if ($this->form_validation->run() == false) {

    $this->load->view('templates/header', $data);

    $this->load->view('templates/sidebar', $data);

    $this->load->view('templates/topbar', $data);

    $this->load->view('user/changepassword', $data);

    $this->load->view('templates/footer');

    } else {

    $current_password = $this->input->post('current_pasword');

    $new_password = $this->input->post('new_pasword1');

    if ( !password_verify($current_password, $data['user']['password'])) {

    $this->session->set_flashdata('message', '<div class="alert alert-danger" role="alert">Wrong current password</div>');

    redirect('user/changepassword');

    } else {

    if ($current_password == $new_password) {

    $this->session->set_flashdata('message', '<div class="alert alert-danger" role="alert">New password cannot be the same as current password</div>');

    redirect('user/changepassword');

    } else {

    //password yang benar

    $password_hash = password_hash($new_password, PASSWORD_DEFAULT);

    //update password

    $this->db->set('password', $password_hash);

    $this->db->where('email', $this->session->userdata('email'));

    $this->db->update('user');

    $this->session->set_flashdata('message', '<div class="alert alert-success" role="alert">Password has been changed</div>');

    redirect('user/changepassword');

    }

    }

    }

    }

  15. Unable to access an error message corresponding to your field name Current Password.()

    izin bertanya pak, itu kenapa ya hehe.

    apa ada yang salah di?

    $this->form_validation->set_rules('current_password', 'Current Password', 'required|trim|');

    Terima kasih

  16. Tolong saya pak dika. password_verify saya selalu mengembalikan nilai FALSE, yang dimana password dr input current password (1234) tidak sama/match dengan hash password dari database.

    https://stackoverflow.com/q/57916334/10642127

  17. dimanakah salahnya mas

    public function changePassword()

    {

    $data['title'] = 'Change Password';

    $data['user'] = $this->db->get_where('user', ['email' =>

    $this->session->userdata('email')])->row_array();

    $this->form_validation->set_rules(

    'current_password',

    'Current Password',

    'required|trim'

    );

    $this->form_validation->set_rules(

    'new_password1',

    'New Password',

    'required|trim|min_length[3]|matches[new_password2]'

    );

    $this->form_validation->set_rules(

    'new_password2',

    'Confrim New Password',

    'required|trim|min_length[3]|matches[new_password1]'

    );

    if ($this->form_validation->run() == false) {

    $this->load->view('templates/header', $data);

    $this->load->view('templates/sidebare', $data);

    $this->load->view('templates/topbar', $data);

    $this->load->view('user/changepassword', $data);

    $this->load->view('templates/footer');

    } else {

    $current_password = $this->input->post('current_password');

    $new_password = $this->input->post('new_password1');

    if (!password_verify($current_password, $data['user']['password'])) {

    $this->session->set_flashdata('message', '<div class="alert alert-danger" role="alert">Wrong current password!

    </div>');

    redirect('user/changepassword');

    } else {

    if ($current_password == $new_password) {

    $this->session->set_flashdata('message', '<div class="alert alert-danger" role="alert">New password cannot be the same as current password!

    </div>');

    redirect('user/changepassword');

    } else {

    //password sudah oke

    $password_hash = password_hash($new_password, PASSWORD_DEFAULT);

    $this->db->set('password', $password_hash);

    $this->db->where('email', $this->session->userdata('email'));

    $this->db->update('user');

    $this->session->set_flashdata('message', '<div class="alert alert-success" role="alert">Password change!

    </div>');

    redirect('user/changepassword');

    }

    }

    }

    }

  18. asslamalaikum pak dhika … pak boleh tau ngga ada link tutorial yang gampang di mngerti dan modelnya sama seperti pnjelasan WPUNPAS untuk upload data menggunakan data CSV menggunakan CI kalo ada di bagi donk carannya 🙏🙏🙏

  19. bang, saya sudah buat controllernya sesuai video, tapi kok selalu muncul wrong password(password salah) ya? mohon solusinya. berikut script nya = public function changePassword()
    {
    $data['title'] = 'Change Password';
    $data['user'] = $this->db->get_where('anggota',['email'=> $this->session->userdata('email')])->row_array();

    $this->form_validation->set_rules('current_password','Current Password','required|trim');
    $this->form_validation->set_rules('new_password1','New Password','required|trim|min_length[8]|matches[new_password2]');
    $this->form_validation->set_rules('new_password2','Confirm New Password','required|trim|min_length[8]|matches[new_password1]');

    if ($this->form_validation->run()==false) {

    $this->load->view('templates/header',$data);
    $this->load->view('templates/sidebar',$data);
    $this->load->view('templates/topbar',$data);
    $this->load->view('user/changepassword',$data);
    $this->load->view('templates/footer');

    } else {

    $psw_sekarang = $this->input->post('current_password');
    $new_password = $this->input->post('new_password1');

    if (!password_verify($psw_sekarang, $data['anggota']['password'])) {
    $this->session->set_flashdata('message','<div class="alert alert-danger" role="alert">Password salah!</div>');
    redirect('user/changepassword');
    } else {
    if ($psw_sekarang == $new_password) {
    $this->session->set_flashdata('message','<div class="alert alert-danger" role="alert">Password baru tidak boleh sama dengan password lama!</div>');
    redirect('user/changepassword');
    } else {

    $password_hash = password_hash($new_password, PASSWORD_DEFAULT);

    $this->db->set('password', $password_hash);
    $this->db->where('email', $this->session->userdata('email'));
    $this->db->update('anggota');

    $this->session->set_flashdata('message','<div class="alert alert-success" role="alert">Password berhasil diganti</div>');
    redirect('user/changepassword');

    }

    }
    }
    }

  20. Maaf Pa Dika..komplitin dong untuk edit dan delete nya di Role,Menu Management dan Submenu Management..terimakasih banget bisa ikut belajar ..

Leave a Comment