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

source: OpenPNE/branches/takanashi/prj_takanashi3/webapp/lib/auth.inc @ 1167

Last change on this file since 1167 was 1167, checked in by takanashi, 14 years ago

pneスレーブ機能マージ

File size: 1.5 KB
Line 
1<?php
2/**
3 * @copyright 2005-2006 OpenPNE Project
4 * @license   http://www.php.net/license/3_01.txt PHP License 3.01
5 */
6
7require_once 'OpenPNE/Auth.php';
8
9$auth = new OpenPNE_Auth();
10$auth->setExpire($GLOBALS['OpenPNE']['common']['session_lifetime']);
11$auth->setIdle($GLOBALS['OpenPNE']['common']['session_idletime']);
12
13if (   !$auth->auth()
14    || !($u = $auth->getUsername(LOGIN_NAME_TYPE))
15    || db_member_is_login_rejected($u)) {
16    $auth->logout();
17
18    if (LOGIN_URL_PC) {
19        client_redirect_absolute(get_login_url());
20    } else {
21        $_REQUEST['login_params'] = $_SERVER['QUERY_STRING'];
22        openpne_forward('pc', 'page', "o_login");
23        exit;
24    }
25}
26
27$auth->uid($u);
28$GLOBALS['AUTH'] = $auth;
29
30if (!$_SESSION['regist_step']) {
31    $check_param = db_member_check_param_inputed($u);
32    $_SESSION['regist_step'] = ($check_param == 0);
33   
34    //プロフィールが未登録の場合はリダイレクト
35    $prof_ext_page=array(
36    "do_h_regist_prof"=>true,
37    "page_h_regist_prof"=>true,
38    "do_inc_page_header_logout"=>true,
39    );
40   
41    if (($check_param==1) && !$prof_ext_page[$_REQUEST['a']]) {
42        openpne_redirect('pc', 'page_h_regist_prof');
43    }
44   
45    //メールアドレスが未登録の場合はリダイレクト
46    $mail_ext_page=array(
47    "do_h_regist_address"=>true,
48    "page_h_regist_address"=>true,
49    "do_inc_page_header_logout"=>true,
50    );
51   
52    if (($check_param==2) && !$mail_ext_page[$_REQUEST['a']]) {
53        openpne_redirect('pc', 'page_h_regist_address');
54    }
55}
56
57?>
Note: See TracBrowser for help on using the repository browser.