예제 #1
0
 public function SavePassword()
 {
     $this->sql = "SELECT `password` FROM `user` WHERE `id`='" . $this->data["sessdata"]["userid"] . "'";
     $data = parent::custom();
     if ($this->data["reqdata"]["oldpassword"] === $data[0]['password']) {
         $this->data["keyvalue"] = $this->data["sessdata"]["userid"];
         $this->data["reqdata"] = array("password" => $this->data["reqdata"]["newpassword"]);
         parent::Update();
     } else {
         parent::response();
     }
 }