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


PHP eZUser::fetchUserClassList方法代碼示例

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


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

示例1: fetchUserGroupClassNames

 static function fetchUserGroupClassNames()
 {
     // Get names of user classes
     $userClassNames = array();
     $userClasses = eZUser::fetchUserClassList(false, array('identifier'));
     foreach ($userClasses as $class) {
         $userClassNames[] = $class['identifier'];
     }
     // Get names of all allowed content-classes for the Users subtree
     $contentIni = eZINI::instance("content.ini");
     $userGroupClassNames = array();
     if ($contentIni->hasVariable('ClassGroupIDs', 'Users') and is_numeric($usersClassGroupID = $contentIni->variable('ClassGroupIDs', 'Users')) and count($usersClassList = eZContentClassClassGroup::fetchClassList(eZContentClass::VERSION_STATUS_DEFINED, $usersClassGroupID)) > 0) {
         foreach ($usersClassList as $userClass) {
             $userGroupClassNames[] = $userClass->attribute('identifier');
         }
     }
     // Get names of user-group classes
     $groupClassNames = array_diff($userGroupClassNames, $userClassNames);
     return $groupClassNames;
 }
開發者ID:brookinsconsulting,項目名稱:ezecosystem,代碼行數:20,代碼來源:ezuser.php

示例2: fetchExpiryNotificationPendingList

 /**
  * Fetch the eZPaEx objects that have their password about to expire
  *
  * @return array of eZPaEx objects corresponding to users that have to be notified
  */
 static function fetchExpiryNotificationPendingList()
 {
     $currentTime = time();
     $conds = array('expirationnotification_sent' => 0, 'passwordlifetime' => array('>', 0));
     $customConds = ' AND (passwordlifetime *86400 - (' . $currentTime . ' - password_last_updated ) ) < expirationnotification ';
     $userClassIDs = array();
     foreach (eZUser::fetchUserClassList(true) as $userClass) {
         $userClassIDs[] = $userClass->attribute('id');
     }
     if (empty($userClassIDs)) {
         return array();
     }
     $customConds .= ' AND ezcontentobject.id = contentobject_id ';
     $customConds .= ' AND ' . eZDB::instance()->generateSQLINStatement($userClassIDs, 'ezcontentobject.contentclass_id');
     return eZPersistentObject::fetchObjectList(eZPaEx::definition(), null, $conds, null, null, true, false, null, array('ezcontentobject'), $customConds);
 }
開發者ID:netbliss,項目名稱:ezmbpaex,代碼行數:21,代碼來源:ezpaex.php


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