本文整理汇总了PHP中Setting::getUserSettingGlobal方法的典型用法代码示例。如果您正苦于以下问题:PHP Setting::getUserSettingGlobal方法的具体用法?PHP Setting::getUserSettingGlobal怎么用?PHP Setting::getUserSettingGlobal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Setting
的用法示例。
在下文中一共展示了Setting::getUserSettingGlobal方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUserSettingGlobal
function getUserSettingGlobal($name, $default = null, $userid = null)
{
return Setting::getUserSettingGlobal($name, $default, $userid);
}
示例2: getUserSetting
function getUserSetting($name, $default = null, $global = null)
{
if (is_null($global)) {
$name = 'plugin_' . $name;
}
return Setting::getUserSettingGlobal($name, $default);
}
示例3: getHomepage
static function getHomepage($userid = null)
{
if (!isset($userid) || empty($userid)) {
$userid = getUserId();
}
$info = unserialize(Setting::getUserSettingGlobal('userLinkInfo', '', $userid));
if (is_null($info)) {
$info = array('type' => 'default');
}
switch ($info['type']) {
case "external":
$homepage = $info['url'];
break;
case "internal":
$homepage = getDefaultURL($info['blogid']);
break;
case "author":
$homepage = getDefaultURL($info['blogid']) . "/author/" . URL::encode(User::getName($userid));
break;
case "default":
default:
$homepage = null;
}
return $homepage;
}
示例4: date
?>
"><?php
echo $row['loginid'];
?>
</a></td>
<td><?php
echo $row['name'];
?>
</td>
<td><?php
echo $row['lastlogin'] ? date("Y/m/d H:i:s T", $row['lastlogin']) : '<span class="warning">' . _t('아직 로그인하지 않았습니다.') . '</span>';
?>
</td>
<td><?php
if (empty($row['lastlogin']) || null !== Setting::getUserSettingGlobal('AuthToken', null, $row['userid'])) {
echo Setting::getUserSettingGlobal('AuthToken', null, $row['userid']);
}
?>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
</div>
<?php
$paging = array('url' => "", 'prefix' => '?page=', 'postfix' => '', 'total' => 0, 'pages' => 0, 'page' => 0);
示例5: validateAPIKey
function validateAPIKey($blogid, $loginid, $key)
{
$userid = User::getUserIdByEmail($loginid);
if ($userid === false) {
return false;
}
$currentAPIKey = Setting::getUserSettingGlobal('APIKey', null, $userid);
if ($currentAPIKey == null) {
if (!User::confirmPassword($userid, $key)) {
header('HTTP/1.1 403 Forbidden');
exit;
}
} else {
if ($currentAPIKey != $key) {
header('HTTP/1.1 403 Forbidden');
exit;
}
}
return true;
}
示例6: _t
<?php
echo _t('현재의 모든 데이터를 TTXML형태의 백업파일로 보관합니다.<br />첨부파일을 포함시킬 수 있으며, 복원할 경우 자동으로 첨부파일이 처리됩니다.<br />백업파일은 서버에 저장하거나 다운받으실 수 있습니다.');
?>
</p>
</div>
<?php
if (file_exists(__TEXTCUBE_CACHE_DIR__ . "/backup/{$blogid}.xml")) {
$fileTime = Timestamp::format5(filectime(__TEXTCUBE_CACHE_DIR__ . "/backup/{$blogid}.xml"));
?>
<div class="notification-box">
<p><?php
echo _f('서버에 %1에 백업한 파일이 존재합니다.', $fileTime);
?>
</p>
<?php
$apikey = Setting::getUserSettingGlobal('APIKey', null, getUserId());
if ($apikey != null) {
?>
<p>
<?php
echo _t('복원을 위하여 외부에서 백업 파일에 접근하려면 아래의 주소를 이용하세요.');
?>
</p>
<p class="url"><?php
echo $context->getProperty('uri.default') . "/ttxml?loginid=" . User::getEmail(getUserId()) . "&key=" . $apikey;
?>
</p>
<?php
} else {
?>
<p>
示例7: requirePrivilege
/// Copyright (c) 2004-2015, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
require ROOT . '/library/preprocessor.php';
$context = Model_Context::getInstance();
$context->setProperty('service.admin_script', 'control.js');
require ROOT . '/interface/common/control/header.php';
requirePrivilege('group.creators');
$uid = $suri['id'];
$usersetting = User::getInfo($uid);
$pool = DBModel::getInstance();
$pool->init("Privileges");
$pool->setQualifier("acl & " . BITWISE_OWNER, "neq", 0);
$pool->setQualifier("blogid", "eq", $blogid);
$usersetting['owner'] = $pool->getCell("userid");
$AuthToken = Setting::getUserSettingGlobal('AuthToken', null, $uid);
?>
<script type="text/javascript">
//<![CDATA[
function makeToken(uid) {
var request = new HTTPRequest("<?php
echo $context->getProperty('uri.blog');
?>
/control/action/user/makeToken/?userid="+uid);
request.onSuccess = function() {
alert("<?php
echo _t('임시 암호가 설정되었습니다.');
?>
");
window.location.reload();
示例8: _t
<th class="site"><span class="text"><?php
echo _t('오픈아이디');
?>
</span></th>
<th class="site"><span class="text"><?php
echo _t('삭제');
?>
</span></th>
</tr>
</thead>
<tbody>
<?php
$currentOpenID = Acl::getIdentity('openid');
$openid_list = array();
for ($i = 0; $i < OPENID_REGISTERS; $i++) {
$openid_identity = Setting::getUserSettingGlobal("openid." . $i);
if (!empty($openid_identity)) {
array_push($openid_list, $openid_identity);
}
}
for ($i = 0; $i < count($openid_list); $i++) {
$className = $i % 2 == 1 ? 'even-line' : 'odd-line';
$className .= $i == count($openid_list) - 1 ? ' last-line' : '';
?>
<tr class="<?php
echo $className;
?>
inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')">
<td><?php
echo $openid_list[$i];
?>