Keyword

mod_k2_users - Retrieve specific users, order ignored

  • David Hansen
  • David Hansen's Avatar Topic Author
  • Offline
  • New Member
More
14 years 2 months ago #85731 by David Hansen
The drag & drop ordering of the users in the Module Parameters for mod_k2_users doesn't seem to work.  It does restrict the users to those selected, but the order returned by MySQL seems to be based on UID not the order specified.  I was unable to find any code that was meant to support this functionality so I added some.

If there is already some support for that desirable feature, if so, where is it and how do I make use of it?

@version $Id: helper.php 483 2010-06-16 18:13:40Z joomlaworks $

++ after line 48 ::: $userObjects = db->loadObjectList() - added

$newUserObjects = array();
foreach ($IDs as $id) {
   foreach ($userObjects as $uO) {
      if ($uO->UID == $id) {
         $newUserObjects[] = $uO;
         break;
      }
   }
}
$userObjects = $newUserObjects;


Thanks,

David

Please Log in or Create an account to join the conversation.

More
13 years 4 months ago #85732 by Next Wave, Inc.
Replied by Next Wave, Inc. on topic mod_k2_users - Retrieve specific users, order ignored
David,  Wow, Thanks for this bug-fix.  It still works in 2.4.1, but the line number for the line you gave seems to now be 42.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum