this error is starting to get really annoying:
File location library/SortMem/ControllerPublic/Member.phpwell i traced the error to Member.php file i found:
Code:<?php class SortMem_ControllerPublic_Member extends XFCP_SortMem_ControllerPublic_Member { public function actionIndex() { $options = Xenforo_Application::get('options'); $visitor = XenForo_Visitor::getInstance(); $userModel = $this->_getUserModel(); $usergroups = XenForo_Model::create('SortMem_Model_UserGroups'); $sortables = Xenforo_Application::getSimpleCacheData('sort_mem_sortables'); $userId = $this->_input->filterSingle('user_id', XenForo_Input::UINT); $ordermem = $this->_request->getParam('sort'); $directmem = $this->_request->getParam('dir'); $userfilter = array(); $userfilter = $this->_request->getParam('userfilter'); $defaultOrder = $options->sort_default_order; $defaultDir = $options->sort_default_direct; $canUseFilter = $visitor->hasPermission('general', 'CanFilterUsersSortMem'); if ($userId) { return $this->responseReroute('XenForo_ControllerPublic_Member','member'); } else if ($this->_input->inRequest('user_id')) { return $this->responseError(new XenForo_Phrase('posted_by_guest_no_profile')); } $username = $this->_input->filterSingle('username', XenForo_Input::STRING); if ($username !== '') { $user = $userModel->getUserByName($username); if ($user) { return $this->responseRedirect( XenForo_ControllerResponse_Redirect::SUCCESS, XenForo_Link::buildPublicLink('members', $user) ); } else { $userNotFound = true; } } else { $userNotFound = false; } $page = $this->_input->filterSingle('page', XenForo_Input::UINT); $usersPerPage = XenForo_Application::get('options')->membersPerPage; $criteria = array( 'user_state' => 'valid', 'is_banned' => 0 ); $canUseSortCriteria = 0; foreach ($sortables AS &$sortcriteria){ $sortcriteria['sort_phrase'] = new XenForo_Phrase($sortcriteria['sort_phrase']); $sortcriteria['show_phrase'] = new XenForo_Phrase($sortcriteria['show_phrase']); if(($ordermem == $sortcriteria['title']) && $sortcriteria['enable_sort']) $canUseSortCriteria = 1; $sortcriteria['column'] = explode('.', $sortcriteria['sort_column']); } if(!$canUseSortCriteria) $ordermem = ''; if (($visitor->get('is_admin') && $options->sort_view_admin) OR ($visitor->get('is_moderator') && $options->sort_view_mod)) { $groups = ($usergroups); if($userfilter) $groupscrit = $userfilter; else $groupscrit = ''; } else { if($options->sort_filter_banned == 1) { $criteria['is_banned'] = 1; } if($options->SortMem_usergroups_user && $options->SortMem_usergroups) $groupschoose = array_intersect($options->SortMem_usergroups_user,$options->SortMem_usergroups); else $groupschoose = $options->SortMem_usergroups_user; if($groupschoose) $groups = ($usergroups->get_user_groups($userfilter,$groupschoose)); else $groups = array(); if($userfilter && $canUseFilter) $groupscrit = array_intersect($userfilter,$options->SortMem_usergroups_user); else $groupscrit = $options->SortMem_usergroups; if (!$groupscrit) $groupscrit = $options->SortMem_usergroups; if($options->sort_filter_admins == 1) { $criteria['is_admin'] = 0; } if($options->sort_filter_mods == 1) { $criteria['is_moderator'] = 0; } } $criteria['user_group_id'] = $groupscrit; $criteria['secondary_group_ids'] = $groupscrit; if(!$ordermem && !$directmem){ foreach ($sortables AS &$sortcriteria){ if ($sortcriteria['is_default']){ $ordermem = $sortcriteria['title']; $directmem = $sortcriteria['default_order']; } } } elseif(!$directmem){ foreach ($sortables AS &$sortcriteria){ if ($sortcriteria['title'] == $ordermem){ $directmem = $sortcriteria['default_order']; } } } // users for the member list $users = $userModel->getUsersSM($criteria, array( 'join' => XenForo_Model_User::FETCH_USER_FULL, 'perPage' => $usersPerPage, 'page' => $page, 'order' => $ordermem, 'direction' => $directmem )); // most recent registrations $latestUsers = $userModel->getLatestUsersSM($criteria, array('limit' => $options->sort_mlu)); // most active users (highest post count) $activeUsers = $userModel->getMostActiveUsersSM($criteria, array('limit' => $options->sort_mau)); $pageNavParams['sort'] = $ordermem; $pageNavParams['dir'] = $directmem; $pageNavParams['userfilter'] = $userfilter; $viewParams = array( 'users' => $users, 'totalUsers' => $userModel->countUsersSM($criteria), 'page' => $page, 'usersPerPage' => $usersPerPage, 'ordermem' => $ordermem, 'directmem' => $directmem, 'pageNavParams' => $pageNavParams, 'latestUsers' => $latestUsers, 'activeUsers' => $activeUsers, 'userNotFound' => $userNotFound, 'groups' => $groups, 'userfilter' => $userfilter, 'canUseFilter' => $canUseFilter, 'sortables' => $sortables ); return $this->responseView('XenForo_ViewPublic_Member_List', 'member_list', $viewParams); } protected function _getUserModel() { return $this->getModelFromCache('XenForo_Model_User'); } }
where:
// users for the member list
$users = $userModel->getUsersSM($criteria, array(
'join' => XenForo_Model_User::FETCH_USER_FULL,
'perPage' => $usersPerPage,
'page' => $page,
'order' => $ordermem,
'direction' => $directmem
the error occurs more specifically $users = $userModel->getUsersSM($criteria, array(
line
i am no xenforo coder but the error lies in here not sure how to fix it though
Anyways, it would require you to add a column to xf_user or xf_user_profile and a CRON job to update it. Then you can use that column.
Hi Martok,Excellent add-on, Moz, very useful indeed.
A couple of things I've noticed is that if the Registration Date is set to show then it appears blank for all users. If the Last Activity is set to show then it displays in Unix time rather than 'proper' time.
View attachment 43603
Any possibility of a fix for these, please?
It wasn't fixed and I no longer use this add-on.Hi Martok,
Don't think you got a response for this, did you end up getting it fixed? If so, how? I'm getting the same thing on my forum. Also the registration date is missing like yours is. :\
Thanks for the quick reply. Mind me asking what you're using now? I really need to have the Registration Date show.It wasn't fixed and I no longer use this add-on.
I'm not using anything, just the default member list.Thanks for the quick reply. Mind me asking what you're using now? I really need to have the Registration Date show.
Thanks in advance.
We use essential cookies to make this site work, and optional cookies to enhance your experience.