public static function template_create(&$templateName, array &$params, XenForo_Template_Abstract $template)
{
if($templateName == "user_edit")
{
$visitor = XenForo_Visitor::getInstance();
$params['canManageAttachments'] = ($visitor->hasAdminPermission('attachment')
&& $visitor->hasPermission('attachmentGallery','canViewOthersGallery')
);
//echo '<pre>';print_r($params);echo '</pre>';
}
}