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

Changeset 2929


Ignore:
Timestamp:
May 16, 2007, 8:52:58 PM (13 years ago)
Author:
ogawa
Message:

#769:個体識別番号の重複エラーで登録できない場合がある

Location:
OpenPNE/branches/2.8.x/webapp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/2.8.x/webapp/lib/db/member.php

    r2913 r2929  
    610610}
    611611
    612 //対象のアドレスが、登録されてるか否か
    613 function db_member_is_sns_join4mail_address($mail_address)
    614 {
    615     $params = array(t_encrypt($mail_address));
    616 
    617     $sql = "SELECT c_member_id FROM c_member_secure WHERE pc_address = ?";
     612/**
     613 * 対象のアドレスが、登録されてるか否か
     614 *
     615 * @param string $mail_address
     616 * @param int $c_member_id チェックから除外するメンバーID
     617 */
     618function db_member_is_sns_join4mail_address($mail_address, $c_member_id = 0)
     619{
     620    $params = array(t_encrypt($mail_address), intval($c_member_id));
     621
     622    $sql = "SELECT c_member_id FROM c_member_secure WHERE pc_address = ? AND c_member_id <> ?";
    618623    $array = db_get_row($sql, $params);
    619624
    620     $sql = "SELECT c_member_id FROM c_member_secure WHERE ktai_address = ?";
     625    $sql = "SELECT c_member_id FROM c_member_secure WHERE ktai_address = ? AND c_member_id <> ?";
    621626    $k_array = db_get_row($sql, $params);
    622627
  • OpenPNE/branches/2.8.x/webapp/lib/util/util.php

    r2923 r2929  
    539539 * 登録してもよいメールアドレスかどうか
    540540 */
    541 function util_is_regist_mail_address($mail_address)
     541function util_is_regist_mail_address($mail_address, $c_member_id = 0)
    542542{
    543543    if (!db_common_is_mailaddress($mail_address)) {
     
    545545    }
    546546   
    547     if (db_member_is_sns_join4mail_address($mail_address)) {
     547    if (db_member_is_sns_join4mail_address($mail_address, $c_member_id)) {
    548548        return false;
    549549    }
  • OpenPNE/branches/2.8.x/webapp/modules/ktai/do/o_update_ktai_address.php

    r2913 r2929  
    2828
    2929        // メールアドレスが登録できるかどうか
    30         if (!util_is_regist_mail_address($pre['ktai_address'])) {
     30        if (!util_is_regist_mail_address($pre['ktai_address'], $pre['c_member_id'])) {
    3131            openpne_redirect('ktai', 'page_o_login', array('msg' => 42));
    3232        }
     
    6363        // 携帯の個体識別番号の取得が任意
    6464            if ($easy_access_id = OpenPNE_KtaiID::getID()) {
    65                 if ($c_member_id != db_member_c_member_id4easy_access_id($easy_access_id)) {
     65                $id = db_member_c_member_id4easy_access_id($easy_access_id);
     66                if ($id && $c_member_id != $id) {
    6667                    $p = array('msg' => 39, 'ses' => $ses);
    6768                    openpne_redirect('ktai', 'page_o_login2', $p);
Note: See TracChangeset for help on using the changeset viewer.