當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserConfig::admins方法代碼示例

本文整理匯總了PHP中UserConfig::admins方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserConfig::admins方法的具體用法?PHP UserConfig::admins怎麽用?PHP UserConfig::admins使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UserConfig的用法示例。


在下文中一共展示了UserConfig::admins方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: dirname

<?php

require_once dirname(__FILE__) . '/global.php';
#UserConfig::$DEBUG = true;
UserConfig::$mysql_host = $host;
UserConfig::$mysql_db = $db;
UserConfig::$mysql_user = $user;
UserConfig::$mysql_password = $pass;
UserConfig::$mysql_port = $port;
// TODO - implement accounts and then switch it to true.
UserConfig::$useAccounts = false;
#UserConfig::$enableInvitations = true;
UserConfig::$supportEmailFrom = $supportEmailFrom;
UserConfig::$supportEmailReplyTo = $supportEmailReplyTo;
UserConfig::$SESSION_SECRET = $sessionSecret;
UserConfig::$admins = $instanceAdmins;
UserConfig::$dont_display_activity_for = $instanceAdmins;
UserConfig::$header = dirname(__FILE__) . '/header.php';
UserConfig::$footer = dirname(__FILE__) . '/footer.php';
UserConfig::$rememberMeDefault = true;
define('SHOWSLOW_ACTIVITY_ADD_URL', 1);
define('SHOWSLOW_ACTIVITY_PAGETEST_START', 2);
define('SHOWSLOW_ACTIVITY_URL_SEARCH', 3);
// array of activities in the system velue is an array of label and value of activity
UserConfig::$activities[SHOWSLOW_ACTIVITY_ADD_URL] = array('Added URL for monitoring', 5);
UserConfig::$activities[SHOWSLOW_ACTIVITY_PAGETEST_START] = array('Started WebPagetest test', 2);
UserConfig::$activities[SHOWSLOW_ACTIVITY_URL_SEARCH] = array('Searched a URL in the list', 1);
if ($facebookAPIKey) {
    UserConfig::loadModule('facebook');
    new FacebookAuthenticationModule($facebookAPIKey, $facebookSecret);
}
開發者ID:ryandoherty,項目名稱:showslow,代碼行數:31,代碼來源:users_config.php

示例2: UsernamePasswordAuthenticationModule

 * You must fill it in with some random string
 * this protects some of your user's data when sent over the network
 * and must be different from other sites
 */
UserConfig::$SESSION_SECRET = '...some.random.characters.go.here...';
/**
 * Database connectivity 
 */
UserConfig::$mysql_host = 'localhost';
UserConfig::$mysql_db = '...database...';
UserConfig::$mysql_user = '...username...';
UserConfig::$mysql_password = '...password...';
/**
 * User IDs of admins for this instance (to be able to access dashboard at /users/admin/)
 */
UserConfig::$admins = array();
// usually first user has ID of 1
/**
 * Set these to point at your header and footer or leave them commented out to use default ones
 */
#UserConfig::$header = dirname(__FILE__).'/header.php';
#UserConfig::$footer = dirname(__FILE__).'/footer.php';
/**
 * Username and password registration configuration
 * just have these lines or comment them out if you don't want regular form registration
 */
UserConfig::loadModule('usernamepass');
new UsernamePasswordAuthenticationModule();
/**
 * Facebook Connect configuration
 * Register your app here: http://www.facebook.com/developers/createapp.php
開發者ID:russelldavis,項目名稱:UserBase,代碼行數:31,代碼來源:users_config.sample.php


注:本文中的UserConfig::admins方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。