Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function _getNotableMembers($type, $limit)
- {
- $userModel = $this->_getUserModel();
- $notableCriteria = array(
- 'is_banned' => 0
- );
- if ($type == 'equipe')
- {
- $notableCriteria['user_group_id'] = array(15,14,13,12,11);
- }
- $typeMap = array(
- 'messages' => 'message_count',
- 'likes' => 'like_count',
- 'equipe' => 'user_group_id'
- );
- if (XenForo_Application::getOptions()->enableTrophies)
- {
- $typeMap['points'] = 'trophy_points';
- }
- if (!isset($typeMap[$type]))
- {
- return false;
- }
- $field = $typeMap[$type];
- if ($type != 'equipe'){
- $notableCriteria[$field] = array('>', 0);
- }
- return array($userModel->getUsers($notableCriteria, array(
- 'join' => XenForo_Model_User::FETCH_USER_FULL,
- 'limit' => $limit,
- 'order' => $field,
- 'direction' => ($type == 'equipe' ? 'asc' : 'desc'),
- 'direction' => 'desc'
- )), $typeMap[$type]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement