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

Changeset 957


Ignore:
Timestamp:
Nov 30, 2006, 3:49:36 PM (14 years ago)
Author:
maruyama
Message:

管理画面にユーザID出力

Location:
OpenPNE/branches/maruyama/prj_ext_auth/webapp
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/maruyama/prj_ext_auth/webapp/lib/auth.inc

    r654 r957  
    2828$GLOBALS['AUTH'] = $auth;
    2929
     30/*
     31//プロフィールが未登録の場合はリダイレクト
     32$prof_ext_page=array(
     33"do_h_regist_prof"=>true,
     34"page_h_regist_prof"=>true,
     35"do_inc_page_header_logout"=>true,
     36);
     37
     38$param_check = db_member_check_param_inputed($u);
     39
     40if (($param_check==1)&&!$prof_ext_page[$_REQUEST['a']]){
     41    openpne_redirect('pc', 'page_h_regist_prof');
     42}
     43*/
     44
    3045//メールアドレスが未登録の場合はリダイレクト
    31 $c_member_secure = db_member_c_member_secure4c_member_id($u);
    3246$mail_ext_page=array(
    3347"do_h_regist_address"=>true,
     
    3650);
    3751
    38 if (($c_member_secure['pc_address']=="")&&!$mail_ext_page[$_REQUEST['a']]){
     52if (($param_check==2)&&!$mail_ext_page[$_REQUEST['a']]){
    3953    openpne_redirect('pc', 'page_h_regist_address');
    4054}
  • OpenPNE/branches/maruyama/prj_ext_auth/webapp/lib/db/member.php

    r923 r957  
    3939            break;
    4040        }
     41    }
     42   
     43    if ($is_secure) {
     44        $c_member['username'] = db_member_username4c_member_id($c_member_id);
    4145    }
    4246
     
    984988}
    985989
     990function db_member_regist_c_member_pc_address4c_member_id($c_member_id, $pc_address)
     991{
     992    $data = array(
     993    'pc_address' => t_encrypt($pc_address),
     994    'regist_address' => t_encrypt($pc_address),
     995    );
     996    $where = array('c_member_id' => intval($c_member_id));
     997    return db_update('c_member_secure', $data, $where);
     998}
     999
    9861000//(ktai_address)
    9871001
     
    10851099}
    10861100
     1101function db_member_regist_mail($sid, $password)
     1102{
     1103    if (!$c_pc_address_pre = do_common_c_pc_address_pre4sid($sid)) {
     1104        return false;
     1105    }
     1106
     1107    $c_member_id = $c_pc_address_pre['c_member_id'];
     1108    $pc_address = $c_pc_address_pre['pc_address'];
     1109
     1110    if (!db_common_authenticate_password($c_member_id, $password)) {
     1111        return false;
     1112    }
     1113
     1114    db_member_regist_c_member_pc_address4c_member_id($c_member_id, $pc_address);
     1115    db_member_delete_c_pc_address_pre4sid($sid);
     1116    return true;
     1117}
     1118
    10871119//--- c_ktai_address_pre
    10881120
     
    13701402 * ログインしたユーザのメンバー情報が存在しない場合自動で生成
    13711403 */
    1372 function auto_create_member($username){
     1404function db_member_create_member($username){
    13731405        $data = array(
    13741406        'nickname'    => "NO NAME",
     
    14031435}
    14041436
     1437/**
     1438 * プロフィールに必須項目が入力されているかを返す。
     1439 * 0:入力済み
     1440 * 1:プロフィール未入力
     1441 * 2:メールアドレス未登録
     1442 */
     1443function db_member_check_param_inputed($c_member_id){
     1444    $c_member = db_member_c_member4c_member_id($c_member_id);
     1445    /*
     1446    if (($c_member['nickname']=="")
     1447    ||($c_member['birth_year']=="")
     1448    ||($c_member['birth_month']=="")
     1449    ||($c_member['birth_day']=="")
     1450    ||($c_member['c_password_query_id']=="")
     1451    ||($c_member['hashed_password_query_answer']=="")
     1452    ) {
     1453        return 1;
     1454    }
     1455    */
     1456   
     1457    if ($c_member['secure']['pc_address']=="") {
     1458        return 2;
     1459    }
     1460   
     1461    return 0;
     1462}
     1463
    14051464?>
  • OpenPNE/branches/maruyama/prj_ext_auth/webapp/modules/admin/templates/list_c_member.tpl

    r406 r957  
    110110({/foreach})
    111111<th>ID</th>
     112<th>ユーザID</th>
    112113<th>PCアドレス</th>
    113114<th>携帯アドレス</th>
     
    207208({/foreach})
    208209<td class="idnumber">({$item.c_member_id})</td>
     210<td>({if $item.secure.pc_address})({$item.username|t_truncate:"30"|escape:"hexentity"})({else})&nbsp;({/if})</td>
    209211<td>({if $item.secure.pc_address})<a href="mailto:({$item.secure.pc_address|escape:"hexentity"})">({$item.secure.pc_address|t_truncate:"30"|escape:"hexentity"})</a>({else})&nbsp;({/if})</td>
    210212<td>({if $item.secure.ktai_address})<a href="mailto:({$item.secure.ktai_address})">({$item.secure.ktai_address|t_truncate:"30"})</a>({else})&nbsp;({/if})</td>
  • OpenPNE/branches/maruyama/prj_ext_auth/webapp/modules/ktai/do/o_login.php

    r923 r957  
    5757            }
    5858        }
    59         if(!($c_member_id = $auth->getUsername(LOGIN_NAME_TYPE)))
    60             auto_create_member($_POST['username']);
     59        if(!($c_member_id = $auth->getUsername(LOGIN_NAME_TYPE))){
     60            db_member_create_member($_POST['username']);
     61        }
    6162       
    6263        $_SESSION['c_member_id'] = $c_member_id;
  • OpenPNE/branches/maruyama/prj_ext_auth/webapp/modules/pc/do/o_login.php

    r654 r957  
    4646        }
    4747       
    48         if(!($u = $auth->getUsername(LOGIN_NAME_TYPE)))
    49             auto_create_member($_POST['username']);
     48        if(!($u = $auth->getUsername(LOGIN_NAME_TYPE))) {
     49            db_member_create_member($_POST['username']);
     50        }
    5051
    5152        db_api_update_token($auth->uid());
  • OpenPNE/branches/maruyama/prj_ext_auth/webapp/modules/pc/do/o_regist_mail.php

    r923 r957  
    2323        //パスワードが正しい
    2424
    25         if (!do_change_mail($sid, $password)) {
     25        if (!db_member_regist_mail($sid, $password)) {
    2626            $msg = "パスワードが違います";
    2727            $p = array('sid' => $sid, 'msg' => $msg);
Note: See TracChangeset for help on using the changeset viewer.