ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 4204


Ignore:
Timestamp:
Sep 29, 2007, 4:33:58 PM (12 years ago)
Author:
ebihara
Message:

#1129:PCからの新規登録時、携帯メールアドレス登録をプロフィール入力画面から外し、別ページにした。その他各種変更

  • 登録済メンバーに対して個体識別番号登録を強制しないようにした
  • c_member_pre の メールアドレスの暗号化をしないようにした
  • 携帯登録用のセッションを作成し、プロフィール項目入力・携帯アドレス登録がリトライできるようにした
  • プロフィール登録済みで携帯未登録のメールアドレスへの招待があった場合、プロフィール情報を削除するようにした
  • c_member_preのktai_addressも、登録済みメールアドレスかどうかのチェック対象にできるようにした
Location:
OpenPNE/branches/work/ebihara/prj_regist_ktai_uid
Files:
12 added
10 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/ebihara/prj_regist_ktai_uid/webapp/lib/auth.inc

    r4190 r4204  
    6868}
    6969
    70 if (OPENPNE_KTAI_ID_REQUIRED && (!IS_SLAVEPNE || $_SESSION['regist_step'])) {
    71     if (!db_member_is_ktai_id_registed($u)) {
    72         $current_page = $GLOBALS['__Framework']['current_type']."_".$GLOBALS['__Framework']['current_action'];
    73         //携帯個体識別番号が未登録の場合はリダイレクト
    74         $ktai_id_ext_page=array(
    75         'page_h_regist_ktai_id'=>true,
    76         'page_h_regist_ktai_id_end'=>true,
    77         'do_h_regist_ktai_id'=>true,
    78         'do_inc_page_header_logout'=>true,
    79         );
    80        
    81         if (!$ktai_id_ext_page[$current_page]) {
    82                 openpne_redirect('pc', 'page_h_regist_ktai_id');
    83         }
    84     }
    85 }
    86 
    8770?>
  • OpenPNE/branches/work/ebihara/prj_regist_ktai_uid/webapp/lib/db/member.php

    r4193 r4204  
    644644 * @param string $mail_address
    645645 * @param int $c_member_id チェックから除外するメンバーID
    646  */
    647 function db_member_is_sns_join4mail_address($mail_address, $c_member_id = 0)
     646 * @param bool $is_check_pre    c_member_pre をチェックするかどうか
     647 */
     648function db_member_is_sns_join4mail_address($mail_address, $c_member_id = 0, $is_check_pre = false)
    648649{
    649650    $params = array(t_encrypt($mail_address), intval($c_member_id));
     
    655656    $k_array = db_get_row($sql, $params);
    656657
     658    if ($is_check_pre) {
     659        $sql = 'SELECT c_member_pre_id FROM c_member_pre WHERE ktai_address = ?';
     660        $params = array($mail_address);
     661        $p_array = db_get_row($sql, $params);
     662    } else {
     663        $p_array = array();
     664    }
     665
    657666    //対象のアドレスが登録済み
    658     if ($array['c_member_id'] || $k_array['c_member_id']) {
     667    if ($array['c_member_id'] || $k_array['c_member_id'] || $p_array['c_member_pre_id']) {
    659668        return true;
    660669    } else {
     
    755764function db_member_c_member_pre4session($session)
    756765{
    757     $sql = 'SELECT * FROM c_member_pre WHERE session = ?';
     766    $sql = 'SELECT * FROM c_member_pre WHERE ktai_session = ?';
    758767    $params = array($session);
    759768    return db_get_row($sql, $params);
     
    10341043//--- c_member_secure
    10351044
    1036 function db_member_insert_c_member($c_member, $c_member_secure, $is_encrypted = false)
    1037 {
    1038     // 以降の処理のために、メールアドレスが暗号化されている場合は復号化する
    1039     if ($is_encrypted) {
    1040         $c_member_secure['pc_address'] =t_decrypt($c_member_secure['pc_address']);
    1041         $c_member_secure['ktai_address'] = t_decrypt($c_member_secure['ktai_address']);
    1042         $c_member_secure['regist_address'] = t_decrypt($c_member_secure['regist_address']);
    1043     }
    1044 
    1045     if (!is_encrypted && $c_member_secure['pc_address'] && !util_is_regist_mail_address($c_member_secure['pc_address'])) {
     1045function db_member_insert_c_member($c_member, $c_member_secure)
     1046{
     1047    if ($c_member_secure['pc_address'] && !util_is_regist_mail_address($c_member_secure['pc_address'])) {
    10461048        return false;
    10471049    }
    10481050
    1049     if (!is_encrypted && $c_member_secure['ktai_address'] && !util_is_regist_mail_address($c_member_secure['ktai_address'])) {
     1051    if ($c_member_secure['ktai_address'] && !util_is_regist_mail_address($c_member_secure['ktai_address'])) {
    10501052        return false;
    10511053    }
    10521054
    1053     if (!is_encrypted && !util_is_regist_mail_address($c_member_secure['regist_address'])) {
     1055    if (!util_is_regist_mail_address($c_member_secure['regist_address'])) {
    10541056        return false;
    10551057    }
     
    10791081    cache_drop_c_member_profile($c_member_id);
    10801082
    1081     if ($is_encrypted === false) {
    1082         $data = array(
    1083             'c_member_id' => intval($c_member_id),
    1084             'hashed_password' => md5($c_member_secure['password']),
    1085             'hashed_password_query_answer' => md5($c_member_secure['password_query_answer']),
    1086             'pc_address'     => t_encrypt($c_member_secure['pc_address']),
    1087             'ktai_address'   => t_encrypt($c_member_secure['ktai_address']),
    1088             'regist_address' => t_encrypt($c_member_secure['regist_address']),
    1089             'easy_access_id' => '',
    1090         );
    1091     } else {
    1092         $data = array(
    1093             'c_member_id' => intval($c_member_id),
    1094             'hashed_password' => $c_member_secure['password'],
    1095             'hashed_password_query_answer' => $c_member_secure['password_query_answer'],
    1096             'pc_address'     => t_encrypt($c_member_secure['pc_address']),
    1097             'ktai_address'   => t_encrypt($c_member_secure['ktai_address']),
    1098             'regist_address' => t_encrypt($c_member_secure['regist_address']),
    1099             'easy_access_id' => '',
    1100         );
    1101     }
     1083    $data = array(
     1084        'c_member_id' => intval($c_member_id),
     1085        'hashed_password' => $c_member_secure['password'],
     1086        'hashed_password_query_answer' => $c_member_secure['password_query_answer'],
     1087        'pc_address'     => t_encrypt($c_member_secure['pc_address']),
     1088        'ktai_address'   => t_encrypt($c_member_secure['ktai_address']),
     1089        'regist_address' => t_encrypt($c_member_secure['regist_address']),
     1090        'easy_access_id' => '',
     1091    );
    11021092    db_insert('c_member_secure', $data);
    11031093
     
    11431133}
    11441134
    1145 function db_member_update_c_member_pre_secure($c_member_pre_id, $c_member_pre_secure)
     1135function db_member_update_c_member_pre_secure($c_member_pre_id, $c_member_pre_secure, $is_encrypted_password = false)
    11461136{
    11471137    $data = array(
     
    11551145        'password' => md5($c_member_pre_secure['password']),
    11561146        'c_password_query_answer' => md5($c_member_pre_secure['password_query_answer']),
    1157         'pc_address'     => t_encrypt($c_member_pre_secure['pc_address']),
    1158         'ktai_address'     => t_encrypt($c_member_pre_secure['ktai_address']),
    1159         'regist_address' => t_encrypt($c_member_pre_secure['regist_address']),
    1160     );
     1147        'pc_address'     => $c_member_pre_secure['pc_address'],
     1148        'ktai_address'     => $c_member_pre_secure['ktai_address'],
     1149        'regist_address' => $c_member_pre_secure['regist_address'],
     1150        'ktai_session' => $c_member_pre_secure['ktai_session'],
     1151    );
     1152
     1153    if ($is_encrypted_password) {
     1154        $data['password'] = $c_member_pre_secure['password'];
     1155        $data['c_password_query_answer'] = $c_member_pre_secure['password_query_answer'];
     1156    }
     1157
    11611158    return db_update('c_member_pre', $data, array('c_member_pre_id' => $c_member_pre_id));
    11621159}
     
    14411438function db_member_update_c_invite($c_member_id_invite, $pc_address, $message, $session)
    14421439{
     1440    $sql = 'SELECT c_member_pre_id,ktai_session FROM c_member_pre WHERE pc_address = ?';
     1441    $pre = db_get_row($sql, array($pc_address));
     1442
    14431443    $data = array(
    14441444        'c_member_id_invite' => intval($c_member_id_invite),
     
    14471447        'r_date' => db_now(),
    14481448    );
     1449
     1450    // プロフィール項目登録済みで携帯版未登録の場合(個体識別番号必須制)
     1451    if (!empty($pre['ktai_session'])) {
     1452        // プロフィール情報を削除
     1453        db_member_delete_c_member_pre_profile4c_member_pre_id($pre['c_member_pre_id']);
     1454        $tmp = array(
     1455            'nickname' => '',
     1456            'birth_year' => 0,
     1457            'birth_month' => 0,
     1458            'birth_day' => 0,
     1459            'ktai_address' => '',
     1460            'password' => '',
     1461            'c_password_query_id' => 0,
     1462            'c_password_query_answer' => '',
     1463            'ktai_session' => '',
     1464        );
     1465        $data = array_merge($data, $tmp);
     1466    }
     1467
    14491468    $where = array('pc_address' => $pc_address);
    14501469    return db_update('c_member_pre', $data, $where);
     
    14681487    $sql = 'DELETE FROM c_member_pre WHERE session = ?';
    14691488    $params = array($sid);
     1489    return db_query($sql, $params);
     1490}
     1491
     1492function db_member_delete_c_member_pre4ktai_session($ktai_session)
     1493{
     1494    $sql = 'DELETE FROM c_member_pre WHERE ktai_session = ?';
     1495    $params = array($ktai_session);
    14701496    return db_query($sql, $params);
    14711497}
  • OpenPNE/branches/work/ebihara/prj_regist_ktai_uid/webapp/modules/ktai/auth.inc

    r4190 r4204  
    6464    }
    6565}
    66 if (OPENPNE_KTAI_ID_REQUIRED && (!IS_SLAVEPNE || $_SESSION['regist_step'])) {
    67     if (!db_member_is_ktai_id_registed($u)) {
    68         $current_page = $GLOBALS['__Framework']['current_type']."_".$GLOBALS['__Framework']['current_action'];
    69         //携帯個体識別番号が未登録の場合はリダイレクト
    70         $ktai_id_ext_page=array(
    71         'page_h_regist_ktai_id'=>true,
    72         'do_h_regist_ktai_id'=>true,
    73         );
    74        
    75         if (!$ktai_id_ext_page[$current_page]) {
    76             openpne_redirect('ktai', 'page_h_regist_ktai_id');
    77         }
    78     }
    79 }
    8066
    8167function __logout($msg = 0, $c_member_id = 0)
  • OpenPNE/branches/work/ebihara/prj_regist_ktai_uid/webapp/modules/ktai/do/o_regist_ktai_id.php

    r4193 r4204  
    3232        } elseif ((!$pre = db_member_c_member_pre4session($ses)) && !empty($c_member_pre_id)) {
    3333            openpne_redirect('ktai', 'page_o_login');
    34         } elseif (!empty($c_member_pre_id)) {
    35                 $pre['ktai_address'] = t_decrypt($pre['ktai_address']);
    3634        }
    3735
     
    5149        } elseif (!empty($c_member_pre_id) && (md5($password) !== $pre['password'])) {
    5250            $p = array('msg' => 18, 'ses' => $ses);
     51            var_dump(md5($password), $pre['password']);
    5352            openpne_redirect('ktai', 'page_o_login2', $p);
    5453        }
    55 
     54       
    5655        if (!$easy_access_id = OpenPNE_KtaiID::getID()) {
    5756            if (!empty($c_member_id)) {
     
    6261            openpne_redirect('ktai', 'page_o_regist_ktai_uid_err', $p);
    6362        }
    64 
     63       
    6564        $id = db_member_c_member_id4easy_access_id($easy_access_id);
    6665        if (!empty($c_member_id) && $id && $c_member_id != $id) {
     
    7170            openpne_redirect('ktai', 'page_o_regist_ktai_id', $p);
    7271        }
    73 
     72       
    7473        if (db_member_easy_access_id_is_blacklist(md5($easy_access_id))) {
    7574            if (!empty($c_member_id)) {
     
    8079            openpne_redirect('ktai', 'page_o_regist_ktai_id', $p);
    8180        }
    82 
     81       
    8382        if (!empty($c_member_id)) {
    8483            // 既存ユーザの場合は個体識別番号を登録するだけ
     
    102101            );
    103102
    104             $u = db_member_insert_c_member($c_member, $c_member_secure, true);
     103            $u = db_member_insert_c_member($c_member, $c_member_secure);
    105104   
    106105            if (OPENPNE_USE_POINT_RANK) {
     
    135134        // pre の内容を削除
    136135        db_member_delete_c_member_pre4sid($ses);
     136        db_member_delete_c_member_pre4ktai_session($ses);
    137137        db_member_delete_c_member_pre_profile4c_member_pre_id($pre['c_member_pre_id']);
    138138
  • OpenPNE/branches/work/ebihara/prj_regist_ktai_uid/webapp/modules/ktai/page/o_regist_ktai_id.php

    r4190 r4204  
    3636            $this->set('c_member_id', $c_member_id);
    3737        } elseif (!empty($c_member_pre_id) && ($c_member_pre_id == $pre['c_member_pre_id'])) {
    38             $pre['ktai_address'] = t_decrypt($pre['ktai_address']);
    3938            $this->set('c_member_pre_id', $c_member_pre_id);
    4039        } else {
  • OpenPNE/branches/work/ebihara/prj_regist_ktai_uid/webapp/modules/pc/do/o_regist_prof.php

    r4193 r4204  
    2626        }
    2727
    28         // メールアドレスが登録できるかどうか
    2928        $pre = db_member_c_member_pre4sid($sid);
    30         if (!util_is_regist_mail_address($pre['pc_address'])) {
    31             $p = array('msg_code' => 'invalid_url');
    32             openpne_redirect('pc', 'page_o_tologin', $p);
    33         }
    3429
    3530        $mode = $requests['mode'];
     
    10196            $errors[] = '生年月日を未来に設定することはできません';
    10297        }
    103        
    104         if (OPENPNE_KTAI_ID_REQUIRED) {
    105             //携帯アドレスチェック
    106             if (!db_common_is_mailaddress($prof['ktai_address'])) {
    107                 $errors[] = "メールアドレスを正しく入力してください";
    108             } elseif (db_member_is_sns_join4mail_address($prof['ktai_address'])) {
    109                 $errors[] = "そのアドレスは既に登録済みです";
    110             } elseif (!db_member_is_limit_domain4mail_address($prof['ktai_address'])) {
    111                 $errors[] = "そのアドレスは登録できません";
    112             } elseif (!is_ktai_mail_address($prof['ktai_address'])) {
    113                 $errors[] = "携帯アドレスを入力してください";
    114             }
    115         }
    116        
    11798
    11899        if ($mode != 'input' && $errors) {
     
    143124            exit;
    144125        case 'register':
    145             // delete cookie
     126            $pre = db_member_c_member_pre4sid($sid);
     127             // delete cookie
    146128            setcookie(session_name(), '', time() - 3600, ini_get('session.cookie_path'));
    147 
    148             $pre = db_member_c_member_pre4sid($sid);
    149129
    150130            if (!OPENPNE_KTAI_ID_REQUIRED) {
     
    191171                // 登録完了メール送信
    192172                do_regist_prof_do_regist2_mail_send($u);
     173
     174                openpne_redirect('pc', 'page_o_regist_end', array('c_member_id' => $u));
    193175            } else {
    194176                // 個体識別番号登録必須制が「必須にする」である場合、ここでのメンバー登録は
     
    199181                db_member_update_c_member_pre_profile($pre['c_member_pre_id'], $c_member_profile_list);
    200182
    201                 $session = create_hash();
    202 
    203183                // c_member_pre にデータ挿入
    204184                $c_member_pre_secure = array(
    205                     'session' => $session,
     185                    'session' => $pre['session'],
    206186                    'nickname' => $prof['nickname'],
    207187                    'birth_year' => $prof['birth_year'],
     
    214194                    'password_query_answer' => $prof['c_password_query_answer'],
    215195                    'pc_address' => $pre['pc_address'],
    216                     'ktai_address' => $prof['ktai_address'],
    217196                    'regist_address' => $pre['pc_address'],
    218197                );
    219198
    220199                db_member_update_c_member_pre_secure($pre['c_member_pre_id'], $c_member_pre_secure);
    221                
    222                 do_mail_sns_regist_ktai_id_mail_send_pre($pre['c_member_pre_id'], $session, $prof['ktai_address']);
     200
     201                openpne_redirect('pc', 'page_o_regist_ktai_address', array('sid' => $pre['session']));
    223202            }
    224 
    225             openpne_redirect('pc', 'page_o_regist_end', array('c_member_id' => $u));
    226203        }
    227204    }
     
    257234            ),
    258235            'public_flag_birth_year' => array(
    259                 'type' => 'string',
    260             ),
    261             'ktai_address' => array(
    262236                'type' => 'string',
    263237            ),
  • OpenPNE/branches/work/ebihara/prj_regist_ktai_uid/webapp/modules/pc/page/o_regist_prof.php

    r2913 r4204  
    3030        }
    3131
    32         // メールアドレスが登録できるかどうか
    3332        $pre = db_member_c_member_pre4sid($sid);
    34         if (!util_is_regist_mail_address($pre['pc_address'])) {
    35             $p = array('msg_code' => 'invalid_url');
    36             openpne_redirect('pc', 'page_o_tologin', $p);
    37         }
    3833
    3934        $this->set('err_msg', $err_msg);
  • OpenPNE/branches/work/ebihara/prj_regist_ktai_uid/webapp/modules/pc/page/o_regist_prof_confirm.php

    r2913 r4204  
    2929        }
    3030
    31         // メールアドレスが登録できるかどうか
    3231        $pre = db_member_c_member_pre4sid($sid);
    33         if (!util_is_regist_mail_address($pre['pc_address'])) {
    34             $p = array('msg_code' => 'invalid_url');
    35             openpne_redirect('pc', 'page_o_tologin', $p);
    36         }
    3732
    3833        $this->set('inc_page_header', fetch_inc_page_header('regist'));
  • OpenPNE/branches/work/ebihara/prj_regist_ktai_uid/webapp/modules/pc/templates/o_regist_prof.tpl

    r4190 r4204  
    328328<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
    329329</tr>
    330 ({if $smarty.const.OPENPNE_KTAI_ID_REQUIRED})
    331 ({*********})
    332 <tr>
    333 <td class="bg_01" align="center"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
    334 <td class="bg_05" align="left" valign="middle">
    335 
    336 <div class="padding_s">
    337 
    338 携帯アドレス <span class="caution">※</span>
    339 
    340 </div>
    341 
    342 </td>
    343 <td class="bg_01" align="center"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
    344 <td class="bg_02" align="left" valign="middle">
    345 
    346 <div class="padding_s">
    347 
    348 <input type="text" class="text" name="ktai_address" type="text" value="({$profs.ktai_address})" size="30">
    349 <br>※他のメンバーには公開されません
    350 
    351 </div>
    352 
    353 </td>
    354 <td class="bg_01" align="center"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
    355 </tr>
    356 ({*********})
    357 <tr>
    358 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
    359 </tr>
    360 ({*********})
    361 ({/if})
    362330<tr>
    363331<td class="bg_01" align="center"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
  • OpenPNE/branches/work/ebihara/prj_regist_ktai_uid/webapp/modules/pc/templates/o_regist_prof_confirm.tpl

    r4190 r4204  
    252252<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
    253253</tr>
    254 ({if $smarty.const.OPENPNE_KTAI_ID_REQUIRED})
    255 ({*********})
    256 <tr>
    257 <td class="bg_01" align="center"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
    258 <td class="bg_05" align="left" valign="middle">
    259 
    260 <div class="padding_s">
    261 
    262 携帯アドレス <span class="caution">※</span>
    263 
    264 </div>
    265 
    266 </td>
    267 <td class="bg_01" align="center"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
    268 <td class="bg_02" align="left" valign="middle">
    269 
    270 <div class="padding_s">
    271 
    272 ({$prof.ktai_address})
    273 
    274 </div>
    275 
    276 </td>
    277 <td class="bg_01" align="center"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
    278 </tr>
    279 ({*********})
    280 <tr>
    281 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
    282 </tr>
    283 ({*********})
    284 ({/if})
    285254<tr>
    286255<td class="bg_01" align="center"><img src="./skin/dummy.gif" alt="dot" class="dot"></td>
Note: See TracChangeset for help on using the changeset viewer.