Hi, I’m currently running Evo. 1.0.5 and I wanted to create a module similar to the following:
http://www.kunane.com/modx/managing-resources-via-module.html
But with a check on the usergroup to display the appropriate link.
Unfortunately I’m getting an error:
Fatal error: Call to a member function isMember() on a non-object in C:\wamp\www\Projects\Websites\brucecounty.on.ca\brucecounty_ver_2\brucecountyonca\manager\processors\execute_module.processor.php(120) : eval()’d code on line 3
What am I doing wrong?
Here is the code:
global $modx;
if($modx->user->isMember('Human Resources'))
{
$news_id = 126; //ID of your container
}
elseif($modx->user->isMember('Planning'))
{
$news_id = 126; //ID of your container
}
else
{
$news_id = 123; //ID of your container
}
setcookie('webfxtab_childPane', 1, time()+3600, '/');
$modx->sendRedirect("index.php?a=3&id=$news_id",0,"REDIRECT_HEADER");
I’m running the following:
Windows 7
PHP Ver 5.2.4
MySQL 5.0.45
Firefox 3.6.12