示例#1
0
 private function executePersonalinfoChange()
 {
     $this->setMst();
     $check = new CheckRequest();
     $check->checkError($this->requestObj, $this->page_yml["check"]["personalinfo"]);
     if (strlen($this->requestObj->password_old) > 0) {
         $password = sha1($this->requestObj->password_old);
         if ($_SESSION["USER_DATA"]["password"] != $password) {
             $check->setError("password_old", "E019");
         }
         if (strlen($this->requestObj->password_new) < 1) {
             $check->setError("password_new", "E020");
         } else {
             $password = sha1($this->requestObj->password_new);
         }
     }
     $this->error = $check->getError();
     if ($this->error === false) {
         $data = array();
         $data["user_id"] = $_SESSION["USER_DATA"]["user_id"];
         $data["user_name"] = $this->requestObj->user_name;
         if (isset($password)) {
             $data["password"] = $password;
         }
         $data["mailaddress"] = $this->requestObj->mailaddress;
         $data["sex"] = $this->requestObj->sex;
         $data["age"] = $this->requestObj->age;
         $this->dataAccess->beginTransaction("changePersonalinfo", $data);
         //更新後セッション再設定
         foreach ($_SESSION["USER_DATA"] as $key => $value) {
             if (isset($data[$key])) {
                 $_SESSION["USER_DATA"][$key] = $data[$key];
             }
         }
         header("Location: /micce/user/personalinfo/");
     }
 }
示例#2
0
 public function executeConfirmNewAccount()
 {
     $this->newAccountGetData();
     $check = new CheckRequest();
     $check->checkError($this->requestObj, $this->conf["account"]["field"]);
     if (strlen($this->requestObj->user_name) != 0) {
         if (CheckUser::userExist($this->requestObj->user_name) !== false) {
             $check->setError("user_name", "isUserExist");
         }
     }
     $this->error = $check->getError();
     if ($this->error !== false) {
         $this->tpl = "account_new.tpl";
     } else {
         $this->tpl = "account_confirm.tpl";
     }
 }