当前位置: 首页>>代码示例>>PHP>>正文


PHP CUser::getThumbAvatar方法代码示例

本文整理汇总了PHP中CUser::getThumbAvatar方法的典型用法代码示例。如果您正苦于以下问题:PHP CUser::getThumbAvatar方法的具体用法?PHP CUser::getThumbAvatar怎么用?PHP CUser::getThumbAvatar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CUser的用法示例。


在下文中一共展示了CUser::getThumbAvatar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadUsers

 /**
  * Load multiple users at a same time to save up on the queries.
  * @return	boolean		True upon success
  * @param	Array	$userIds	An array of user ids to be loaded.
  */
 public static function loadUsers($userIds)
 {
     $userIds = array_diff_key($userIds, self::$instances);
     if (empty($userIds)) {
         return;
     }
     $ids = implode(",", $userIds);
     $db = JFactory::getDBO();
     $query = 'SELECT  ' . ' a.' . $db->quoteName('userid') . ' as _userid ,' . ' a.' . $db->quoteName('status') . ' as _status , ' . ' a.' . $db->quoteName('points') . ' as _points, ' . ' a.' . $db->quoteName('posted_on') . ' as _posted_on, ' . ' a.' . $db->quoteName('avatar') . ' as _avatar , ' . ' a.' . $db->quoteName('thumb') . ' as _thumb , ' . ' a.' . $db->quoteName('invite') . ' as _invite, ' . ' a.' . $db->quoteName('params') . ' as _cparams,  ' . ' a.' . $db->quoteName('view') . ' as _view, ' . ' a.' . $db->quoteName('friends') . ' as _friends, ' . ' a.' . $db->quoteName('groups') . ' as _groups, ' . ' a.' . $db->quoteName('events') . ' as _events, ' . ' a.' . $db->quoteName('alias') . '	as _alias, ' . ' a.' . $db->quoteName('profile_id') . ' as _profile_id, ' . ' a.' . $db->quoteName('friendcount') . ' as _friendcount, ' . ' a.' . $db->quoteName('storage') . ' as _storage, ' . ' a.' . $db->quoteName('watermark_hash') . ' as _watermark_hash, ' . ' a.' . $db->quoteName('search_email') . ' AS _search_email, ' . ' s.' . $db->quoteName('userid') . ' as _isonline, u.* ' . ' FROM ' . $db->quoteName('#__community_users') . ' as a ' . ' LEFT JOIN ' . $db->quoteName('#__users') . ' u ' . ' ON u.' . $db->quoteName('id') . '=a.' . $db->quoteName('userid') . ' LEFT OUTER JOIN ' . $db->quoteName('#__session') . 's ' . ' ON s.' . $db->quoteName('userid') . '=a.' . $db->quoteName('userid') . ' WHERE a.' . $db->quoteName('userid') . ' IN (' . $ids . ')';
     $db->setQuery($query);
     $objs = $db->loadObjectList();
     foreach ($objs as $obj) {
         $user = new CUser($obj->_userid);
         $isNewUser = $user->init($obj);
         $user->getThumbAvatar();
         // technically, we should not fetch any new user here
         if ($isNewUser) {
             // New user added to jomSocial database
             // trigger event onProfileInit
             $appsLib = CAppPlugins::getInstance();
             $appsLib->loadApplications();
             $args = array();
             $args[] = $user;
             $appsLib->triggerEvent('onProfileCreate', $args);
         }
         CFactory::getUser($obj->_userid, $user);
     }
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:33,代码来源:core.php

示例2: loadUsers

 /**
  * Load multiple users at a same time to save up on the queries.
  * @return	boolean		True upon success
  * @param	Array	$userIds	An array of user ids to be loaded.
  */
 public function loadUsers($userIds)
 {
     if (empty($userIds)) {
         return;
     }
     $ids = implode(",", $userIds);
     $db =& JFactory::getDBO();
     $query = "SELECT  " . "\ta.`userid` as _userid , " . "\ta.`status` as _status , " . "\ta.`points`\tas _points, " . "\ta.`posted_on` as _posted_on, " . "\ta.`avatar`\tas _avatar , " . "\ta.`thumb`\tas _thumb , " . "\ta.`invite`\tas _invite, " . "\ta.`params`\tas _cparams,  " . "\ta.`view`\tas _view, " . " a.`friendcount` as _friendcount, " . " a.`alias`\tas _alias, " . " a.`profile_id` as _profile_id, " . " a.`friendcount` as _friendcount, " . " a.`storage` as _storage, " . " a.`watermark_hash` as _watermark_hash, " . "s.`userid` as _isonline, u.* " . " FROM #__community_users as a " . " LEFT JOIN #__users u " . " ON u.`id`=a.`userid` " . " LEFT OUTER JOIN #__session s " . " ON s.`userid`=a.`userid` " . "WHERE a.`userid` IN ({$ids})";
     $db->setQuery($query);
     $objs = $db->loadObjectList();
     foreach ($objs as $obj) {
         $user = new CUser($obj->_userid);
         $isNewUser = $user->init($obj);
         $user->getThumbAvatar();
         // technically, we should not fetch any new user here
         if ($isNewUser) {
             // New user added to jomSocial database
             // trigger event onProfileInit
             $appsLib = CAppPlugins::getInstance();
             $appsLib->loadApplications();
             $args = array();
             $args[] = $user;
             $appsLib->triggerEvent('onProfileCreate', $args);
         }
         CFactory::getUser($obj->_userid, $user);
     }
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:32,代码来源:core.php


注:本文中的CUser::getThumbAvatar方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。