1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to change the default sorting of the Members list?

Discussion in 'XenForo Questions and Support' started by Bellinis, Feb 7, 2011.

  1. Bellinis

    Bellinis Active Member

    How can I change the default sorting of the Members list?
    Right now it sorts alphabetically, but I'd like to see it sorted by registration date (newest first).
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Member list sorting isn't something that's currently possible...
     
  3. Bellinis

    Bellinis Active Member

    That's disappointing :(
    In vb you could simply change the URL to something like .members/list/?order=desc&sort=joindate&pp=30

    Hopefully it will be possible in the near future though! :)
     
  4. ragtek

    ragtek Guest

    THen you would need to extend the index action in the member controller

    relevant part:

    PHP:
    // users for the member list
            
    $users $userModel->getUsers($criteria, array(
                
    'join' => XenForo_Model_User::FETCH_USER_FULL,
                
    'perPage' => $usersPerPage,
                
    'page' => $page
    should be
    PHP:
    // users for the member list
            
    $users $userModel->getUsers($criteria, array(
                
    'join' => XenForo_Model_User::FETCH_USER_FULL,
                
    'perPage' => $usersPerPage,
                
    'page' => $page,
                            
    'order' => 'register_date'
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    ...without code changes ;)
     
  6. Bellinis

    Bellinis Active Member

    Of course it would be way better without code changes, but for now I'm happy with this solution. Thanks guys!
     
  7. ragtek

    ragtek Guest

    With
    i mean that you would need to use the pluginsystem:D
     
  8. Bellinis

    Bellinis Active Member

Share This Page