public function setPwdAction() { if (!$this->validFlag) { echo json_encode(array('ret' => 0, 'msg' => $this->warnMsg)); } else { $user = new User(); $data = $user->getUid($this->session->get('resetMobile')); $res = $user->changePwd($data['u_id'], $this->_sanReq['passwd']); if ($res) { $this->session->remove('resetToken'); $this->session->remove('resetMobile'); echo json_encode(array('ret' => 1)); } } exit; }