当前位置: 首页>>代码示例>>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;未经允许,请勿转载。