$message = ''; $cred = ''; if (count($_GET) > 0) { if (!isset($_GET['c']) || strlen($_GET['c']) < 10) { $message .= '接続するときのURLが正しくありません。途中で欠けた文字で接続していないか確認してください。'; } else { $cred = $_GET['c']; } } if (count($_POST) > 0) { $cred = $_POST['cred']; require_once '../../INTER-Mediator.php'; // Set the valid path to INTER-Mediator.php $dbInstance = new DB_Proxy(); $dbInstance->initialize(array(), array('authentication' => array('email-as-username' => true)), array("db-class" => "PDO"), 2); $result = $dbInstance->resetPasswordSequenceReturnBack(null, $_POST['mail'], $_POST['cred'], $_POST['hashedpw']); // $dbInstance->finishCommunication(true); // $dbInstance->exportOutputDataAsJSON(); if ($result) { $dbInstance = new DB_Proxy(); $dbInstance->initialize(array(array("name" => "authuser", "view" => "authuser", "table" => "dummydummy", "records" => 1, "query" => array(array("field" => "email", "operator" => "=", "value" => $_POST['mail'])), 'send-mail' => array('read' => array('to' => 'email', 'bcc' => '*****@*****.**', 'subject-constant' => 'パスワードのリセットを受付ました', 'from-constant' => 'Masayuki Nii <*****@*****.**>', 'body-template' => 'resetmail.txt', 'body-fields' => "email", 'f-option' => true, 'body-wrap' => 78)))), array(), array("db-class" => "PDO"), 2, "authuser"); $dbInstance->processingRequest("read"); $message .= '<span style="color:black">'; $message .= 'パスワードがリセットされました。'; $message .= '</span>'; } else { $message .= 'パスワードのリセット処理に問題が発生しました。'; } } header('Content-Type: text/html;charset="UTF-8"'); ?>