We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Online members widget | Forum

Niklas E
Niklas E Jan 26 '16
Is there a way to modify so the online user widget is displaying only woman for man and man for woman in the online user widget?


$resultList = array(
            'latest' => array(
                'menu-label' => $language->text('base', 'user_list_menu_item_latest'),
                'userIds' => $this->getIdList($userService->findList(0, $count)),
                'toolbar' => ( $latestUsersCount > $count ? array($toolbar['latest']) : false ),
            'online' => array(
                'menu-label' => $language->text('base', 'user_list_menu_item_online'),
                'menu_active' => true,
                'userIds' => $this->getIdList($userService->findOnlineList(0, $count)),
                'toolbar' => ( $userService->countOnline() > $count ? array($toolbar['online']) : false ),

Slayer May 16 '18
2 years past and no answer to this?
dave Leader
dave Jul 23 '18
You will have to modify the online array function above 

 'userIds' => $this->getIdList($userService->findOnlineList(0, $count)),

In ow_system_plugins/base/bol/user_service.php

and the function name is findOnlineList

youll have to add some sex code logic to that function to filter the result. 

A sample of how the sex is retrieved is in ow_system_plugins/base/controllers/user_list.php

Starting at line 239 you will see how it gets the fields including the sex field.  

So youll need to duplicate the sex part of the code and add it to the online function above. 

Hope this helps...