Jaxel
Well-known member
In my sitemap generator I am using the following in a CRONJOB:
I figured since this was in a cronjob, it would assume the viewing user would be an unregistered user. Unfortunately, it doesn't seem to work this way and I think it marks the viewing user as an administrator. Naturally I don't want to index private forums into my sitemap, because its pointless and search engines can't reach it anyways.
How would I check for canViewForum based on an unregistered user?
Code:
foreach ($forums AS $forum)
{
if ($this->getModelFromCache('XenForo_Model_Forum')->canViewForum($forum))
{
stuff...
}
}
How would I check for canViewForum based on an unregistered user?