XDinc
Well-known member
Hello there,
I used PHP callback to get user groups with
As you can see below, there is no problem at this stage.
I've
How can I set in this php file if secondary user group is
I 've not reached to success result yet with the my codes but I have to try, and I think I need to learn that.
Thank you for your help.
I used PHP callback to get user groups with
XF\Option\UserGroup::renderSelect
. As you can see below, there is no problem at this stage.
I've
Templater.php
file, base class name: XF\Template\TemplaterHow can I set in this php file if secondary user group is
xUserGroup
via PHP Could you please anyone let me learn or see sample?
Code:
namespace Validator\XF\Template;
class Templater extends XFCP_Templater
{
public function fnUsernameLink($templater, &$escape, $user, $rich = false, $attributes = [])
{
$isAddonEnabledGlobally =! \XF::options()->offsetGet('enableXAddon');
if(!$isAddonEnabledGlobally)
{
/**if secondary group_id == xUserGroup*/
{ My codes......
}
}
return $response;
}
}
I 've not reached to success result yet with the my codes but I have to try, and I think I need to learn that.
Thank you for your help.