Please help with a plugin for oxwall Group. Solve the problem in the file user_groups_widget.php. I would like the dashboard display their group. Groups I get when I do a mod moderation.
widget not showing my hidden groups
I think that would be enough to modify the terms of this code, but you do not know was repeated advice.
$userId = $params->additionalParamList['entityId'];
$count = ( empty($params->customParamList['count']) ) ? 3 : (int) $params->customParamList['count'];
// privacy check
$viewerId = OW::getUser()->getId();
$ownerMode = $userId == $viewerId;
$modPermissions = OW::getUser()->isAuthorized('groups');
if ( !$ownerMode && !$modPermissions )
{
$privacyParams = array('action' => GROUPS_BOL_Service::PRIVACY_ACTION_VIEW_MY_GROUPS, 'ownerId' => $userId, 'viewerId' => $viewerId);
$event = new OW_Event('privacy_check_permission', $privacyParams);
try {
OW::getEventManager()->trigger($event);
}
catch ( RedirectException $e )
{
$this->setVisible(false);
return;
}
}
$userName = BOL_UserService::getInstance()->findUserById($userId)->getUsername();
if ( !$this->assignList($userId, $count) )
{
$this->setVisible($params->customizeMode);
return;
}
$this->setSettingValue(self::SETTING_TOOLBAR, array(array(
'label' => OW::getLanguage()->text('groups', 'widget_user_groups_view_all'),
'href' => OW::getRouter()->urlForRoute('groups-user-groups', array('user' => $userName))
)));
}