function execute($requests) { $tail = $GLOBALS['KTAI_URL_TAIL']; $reason = $requests['reason']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; if ($u == 1) { openpne_redirect('ktai', 'page_h_config'); } //退会理由は必須 if (!$reason) { $p = array('msg' => 38); openpne_redirect('ktai', 'page_h_taikai_confirm', $p); } $password = $requests['password']; if (!db_common_authenticate_password($u, $password, true)) { $p = array('msg' => 18); openpne_redirect('ktai', 'page_h_taikai_confirm', $p); } //退会完了メール送信 do_common_send_mail_taikai_end_ktai($u); if (SEND_USER_DATA) { //退会完了メール送信(管理者宛) do_common_send_mail_taikai4admin($u, $reason); } //退会処理 db_common_delete_c_member($u); @session_destroy(); openpne_redirect('ktai', 'page_o_taikai_end'); }
function execute($requests) { $password = $requests['password']; $reason = $requests['reason']; $u = $GLOBALS['AUTH']->uid(); if ($u == 1) { openpne_redirect('pc', 'page_h_config'); } //退会理由は必須 if (!$reason) { $msg = "退会理由を入力して下さい"; $p = array('msg' => $msg); openpne_redirect('pc', 'page_h_taikai_confirm', $p); } if (!db_common_authenticate_password($u, $password)) { $msg = "パスワードが間違っています"; $p = array('msg' => $msg); openpne_redirect('pc', 'page_h_taikai_confirm', $p); } //退会完了メール送信 do_common_send_mail_taikai_end_pc($u); if (SEND_USER_DATA) { //退会完了メール送信(管理者宛) do_common_send_mail_taikai4admin($u, $reason); } //退会処理 db_common_delete_c_member($u); //ログアウト $GLOBALS['AUTH']->logout(); $p = array('msg_code' => 'taikai'); openpne_redirect('pc', 'page_o_tologin', $p); }
function execute($requests) { // 外部認証の場合はリダイレクト check_action4pne_slave(true); if (!IS_PASSWORD_QUERY_ANSWER) { handle_kengen_error(); } $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $password = $requests['password']; // ---------- //--- 権限チェック // 必要なし //--- // 現在のパスワードが正しいか if (!db_common_authenticate_password($u, $password, true)) { $p = array('msg' => 18); openpne_redirect('ktai', 'page_h_config_password_query', $p); } if (!$requests['c_password_query_id']) { $p = array('msg' => 22); openpne_redirect('ktai', 'page_h_config_password_query', $p); } if (!$requests['password_query_answer']) { $p = array('msg' => 23); openpne_redirect('ktai', 'page_h_config_password_query', $p); } db_member_update_password_query($u, $requests['c_password_query_id'], $requests['password_query_answer']); $p = array('msg' => 24); openpne_redirect('ktai', 'page_h_config', $p); }
function execute($requests) { $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // 現在のパスワードが正しいか if (!db_common_authenticate_password($u, $requests['password'], true)) { $p = array('msg' => 18); openpne_redirect('ktai', 'page_h_config_easy_login', $p); } if (!($easy_access_id = OpenPNE_KtaiID::getID())) { $p = array('msg' => 27); openpne_redirect('ktai', 'page_h_config_easy_login', $p); } if (!$requests['delete']) { // 個体識別番号がすでに登録済み if (db_member_c_member_id4easy_access_id($easy_access_id)) { $p = array('msg' => 39); openpne_redirect('ktai', 'page_h_config', $p); } elseif (db_member_easy_access_id_is_blacklist(md5($easy_access_id))) { $p = array('msg' => 44); openpne_redirect('ktai', 'page_h_config', $p); } else { // update db_member_update_easy_access_id($u, $easy_access_id); $p = array('msg' => 28); openpne_redirect('ktai', 'page_h_config', $p); } } else { // 個体識別番号の取得が必須の場合は個体識別番号の削除はできない if (IS_GET_EASY_ACCESS_ID == 2 || IS_GET_EASY_ACCESS_ID == 3) { handle_kengen_error(); } // delete db_member_update_easy_access_id($u, ''); $p = array('msg' => 29); openpne_redirect('ktai', 'page_h_config', $p); } }
function execute($requests) { //外部認証の場合はリダイレクト check_action4pne_slave(false); $u = $GLOBALS['AUTH']->uid(); // --- リクエスト変数 $old_password = $requests['old_password']; $new_password = $requests['new_password']; $new_password2 = $requests['new_password2']; // ---------- $msg_list = array(); if (!$new_password) { $msg_list[] = "パスワードを入力してください"; } if (!$new_password2) { $msg_list[] = "パスワード(確認)を入力してください"; } if ($new_password !== $new_password2) { $msg_list[] = "パスワードが一致しません"; } if (!ctype_alnum($new_password) || strlen($new_password) < 6 || strlen($new_password) > 12) { $msg_list[] = "パスワードは6~12文字の半角英数で入力してください"; } if (!$msg_list && !db_common_authenticate_password($u, $old_password)) { $msg_list[] = "現在のパスワードが違います"; } // error if ($msg_list) { $_REQUEST['msg'] = array_shift($msg_list); openpne_forward('pc', 'page', "h_config"); exit; } db_member_update_password($u, $new_password); $GLOBALS['AUTH']->logout(); $p = array('msg_code' => 'change_password'); openpne_redirect('pc', 'page_o_tologin', $p); }
function execute($requests) { //外部認証の場合はリダイレクト check_action4pne_slave(true); $tail = $GLOBALS['KTAI_URL_TAIL']; $u = $GLOBALS['KTAI_C_MEMBER_ID']; // --- リクエスト変数 $old_password = $requests['old_password']; $new_password = $requests['new_password']; // ---------- // 現在のパスワードが正しいか if (!db_common_authenticate_password($u, $old_password, true)) { $p = array('msg' => 18); openpne_redirect('ktai', 'page_h_config_password', $p); } // 新しいパスワードは有効な文字列か if (!ctype_alnum($new_password) || strlen($new_password) < 6 || strlen($new_password) > 12) { $p = array('msg' => 20); openpne_redirect('ktai', 'page_h_config_password', $p); } db_member_update_password($u, $new_password); $p = array('msg' => 21); openpne_redirect('ktai', 'page_h_config', $p); }
function execute($requests) { // --- リクエスト変数 $ses = $requests['ses']; $password = $requests['password']; // ---------- // セッションが有効かどうか if (!($pre = db_member_c_ktai_address_pre4session($ses))) { // 無効の場合、login へリダイレクト openpne_redirect('ktai', 'page_o_login'); } // メールアドレスが登録できるかどうか if (!util_is_regist_mail_address($pre['ktai_address'], $pre['c_member_id'])) { openpne_redirect('ktai', 'page_o_login', array('msg' => 42)); } $c_member_id = $pre['c_member_id']; $ktai_address = $pre['ktai_address']; // パスワードチェック if (!db_common_authenticate_password($c_member_id, $password, true)) { $p = array('msg' => 18, 'ses' => $ses); openpne_redirect('ktai', 'page_o_login2', $p); } if (IS_GET_EASY_ACCESS_ID == 2 || IS_GET_EASY_ACCESS_ID == 3) { // 携帯の個体識別番号の取得が必須 if (!($easy_access_id = OpenPNE_KtaiID::getID())) { // 携帯の個体識別番号を取得できませんでした $p = array('msg' => 27, 'ses' => $ses); openpne_redirect('ktai', 'page_o_login2', $p); } else { $id = db_member_c_member_id4easy_access_id($easy_access_id); if ($id && $c_member_id != $id) { $p = array('msg' => 39, 'ses' => $ses); openpne_redirect('ktai', 'page_o_login2', $p); } if (db_member_easy_access_id_is_blacklist(md5($easy_access_id))) { ktai_display_error('携帯メールアドレスを登録できませんでした。'); } // update db_member_update_easy_access_id($c_member_id, $easy_access_id); db_member_update_ktai_address($c_member_id, $ktai_address); db_member_delete_ktai_address_pre($pre['c_ktai_address_pre_id']); openpne_redirect('ktai', 'do_o_easy_login'); } } else { if (IS_GET_EASY_ACCESS_ID == 1) { // 携帯の個体識別番号の取得が任意 if ($easy_access_id = OpenPNE_KtaiID::getID()) { $id = db_member_c_member_id4easy_access_id($easy_access_id); if ($id && $c_member_id != $id) { $p = array('msg' => 39, 'ses' => $ses); openpne_redirect('ktai', 'page_o_login2', $p); } if (db_member_easy_access_id_is_blacklist(md5($easy_access_id))) { ktai_display_error('携帯メールアドレスを登録できませんでした。'); } // update db_member_update_easy_access_id($c_member_id, $easy_access_id); db_member_update_ktai_address($c_member_id, $ktai_address); db_member_delete_ktai_address_pre($pre['c_ktai_address_pre_id']); openpne_redirect('ktai', 'do_o_easy_login'); } } } // 携帯の個体識別番号を取得しない db_member_update_ktai_address($c_member_id, $ktai_address); db_member_delete_ktai_address_pre($pre['c_ktai_address_pre_id']); // login ページへリダイレクト $p = array('msg' => 19, 'kad' => t_encrypt(db_member_username4c_member_id($c_member_id, true))); openpne_redirect('ktai', 'page_o_login', $p); }
function db_member_regist_mail($sid, $password) { if (!($c_pc_address_pre = do_common_c_pc_address_pre4sid($sid))) { return false; } $c_member_id = $c_pc_address_pre['c_member_id']; $pc_address = $c_pc_address_pre['pc_address']; if (!db_common_authenticate_password($c_member_id, $password)) { return false; } db_member_regist_c_member_pc_address4c_member_id($c_member_id, $pc_address); db_member_delete_c_pc_address_pre4sid($sid); return true; }