/** * Filter the fields, which are allowed to user. * @param $userid * @param $fields * @return true */ function onProfileLoad(&$userid, &$fields, $from) { $none = false; $args['triggerForEvents'] = 'onprofileload'; $args['field'] =& $fields; XiptAclHelper::performACLCheck($none, $none, $args); // field according to profiletype $view = JRequest::getVar('view', ''); $task = JRequest::getVar('task', ''); //dont apply field privacy on admin approval plugin if (JRequest::getVar('option', '') == 'com_user' && $task == 'activate') { $activation = JRequest::getVar('activation', null); if (!empty($activation)) { return true; } } if ($view === 'search' && $task === 'advancesearch') { $userid = JFactory::getUser()->id; } XiptLibProfiletypes::filterCommunityFields($userid, $fields, $from); return true; }