$this->validation = new Validation( $_POST); $this->validation->rule('password_old', 'not_empty') ->rule('password', 'not_empty') ->rule('password_confirm', 'not_empty'); if( $this->validation->check() == TRUE){ if( $this->auth->check_password( $_POST['password_old']) == TRUE){ if( $_POST['password'] == $_POST['password_confirm']){ $this->model = Model_Auth_User::factory('user'); if( $this->model->change_password( $_POST, TRUE)){ $this->request->redirect('panel/edit'); $success = 'Dane zostały edytowane poprawnie.'; $this->template->bind_global('success2', $success); } } } else{ } } else{ $messages = $this->validation->errors('validation'); $this->template->bind_global('messages2', $messages); } }
I błąd -
Cytat
ErrorException [ Fatal Error ]: Call to undefined method Model_User::change_password()