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


PHP Settings::isDefaultUserGuest方法代碼示例

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


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

示例1: isGuest

 /**
  * Checks whether or not the current user is a "regular" or "guest" user
  *
  * @return boolean
  */
 public function isGuest()
 {
     return (bool) (!$this->isLoggedIn() || $this->getID() == framework\Settings::getDefaultUserID() && framework\Settings::isDefaultUserGuest());
 }
開發者ID:underblaze,項目名稱:thebuggenie-4.1.0,代碼行數:9,代碼來源:User.php

示例2: hasUserVoted

 /**
  * Whether or not the current user has voted
  *
  * @return boolean
  */
 public function hasUserVoted($user_id, $up)
 {
     $user_id = is_object($user_id) ? $user_id->getID() : $user_id;
     $this->_setupVotes();
     if ($user_id == \thebuggenie\core\framework\Settings::getDefaultUserID() && \thebuggenie\core\framework\Settings::isDefaultUserGuest() || !$this->getProject()->canVoteOnIssues()) {
         return true;
     }
     if (array_key_exists($user_id, $this->_votes)) {
         return $up ? (int) $this->_votes[$user_id] > 0 : (int) $this->_votes[$user_id] < 0;
     } else {
         return false;
     }
 }
開發者ID:AzerothShard,項目名稱:thebuggenie,代碼行數:18,代碼來源:Issue.php

示例3: _populateScopeDetails

 protected function _populateScopeDetails()
 {
     if ($this->_unconfirmed_scopes === null || $this->_confirmed_scopes === null) {
         $this->_unconfirmed_scopes = array();
         $this->_confirmed_scopes = array();
         if ($this->_scopes === null) {
             $this->_scopes = array();
         }
         if ($this->getID() == framework\Settings::getDefaultUserID() && framework\Settings::isDefaultUserGuest()) {
             $this->_confirmed_scopes[framework\Context::getScope()->getID()] = framework\Context::getScope();
         } else {
             $scopes = tables\UserScopes::getTable()->getScopeDetailsByUser($this->getID());
             foreach ($scopes as $scope_id => $details) {
                 if (!$details['confirmed']) {
                     $this->_unconfirmed_scopes[$scope_id] = $details['scope'];
                 } else {
                     $this->_confirmed_scopes[$scope_id] = $details['scope'];
                 }
                 if (!array_key_exists($scope_id, $this->_scopes)) {
                     $this->_scopes[$scope_id] = $details['scope'];
                 }
             }
         }
     }
 }
開發者ID:founderio,項目名稱:thebuggenie,代碼行數:25,代碼來源:User.php

示例4: __

 disabled<?php 
}
?>
>
                <option value=1<?php 
if (\thebuggenie\core\framework\Settings::isDefaultUserGuest()) {
    ?>
 selected<?php 
}
?>
><?php 
echo __('No, the default user is a guest account');
?>
</option>
                <option value=0<?php 
if (!\thebuggenie\core\framework\Settings::isDefaultUserGuest()) {
    ?>
 selected<?php 
}
?>
><?php 
echo __('Yes, the default user is a normal account');
?>
</option>
            </select>
            <?php 
echo config_explanation(__('Select if the default user is a guest user or a normal user'));
?>
        </td>
    </tr>
    <tr>
開發者ID:pkdevboxy,項目名稱:thebuggenie,代碼行數:31,代碼來源:_user.inc.php


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