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

source: OpenPNE/branches/maruyama/prj_ext_auth/webapp/lib/auth.inc @ 957

Last change on this file since 957 was 957, checked in by maruyama, 14 years ago

管理画面にユーザID出力

File size: 1.3 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
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
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
52if (($param_check==2)&&!$mail_ext_page[$_REQUEST['a']]){
53    openpne_redirect('pc', 'page_h_regist_address');
54}
55
56?>
Note: See TracBrowser for help on using the repository browser.