|  | 
 
| PHP复制代码 复制代码         $this->form_validation->set_rules('old_password', 'Old password', 'required');
//         $this->form_validation->set_rules('new_password', 'New Password', 'required|min_length['.$this->config->item('min_password_length', 'ion_auth').']|max_length['.$this->config->item('max_password_length', 'ion_auth').']|matches[new_password_confirm]');
//         $this->form_validation->set_rules('new_password_confirm', 'Confirm New Password', 'required');
 
        $put = $this->input->input_stream();
        $id = $put['id'];
 
        //校验
        if( $put['new_password'] != $put['new_password_confirm'] ){
            echo json_encode(array('status'=>'error','message'=>'两次输入的密码不匹配'));
            exit;
        }
 
        $user = $this->ion_auth->get_user($id);
 
        if ($this->form_validation->run())
        {
 
 
 
 | 
 |