<?php
add_action ("template_redirect", "my_custom_capabilities", 1);
function my_custom_capabilities ()
{
if (fnmatch ("/activity*", $_SERVER["REQUEST_URI"]) && !current_user_can ("access_s2member_ccap_activity"))
{
header ("Location: " . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}
else if (fnmatch ("/messages/compose/?r=dana*", $_SERVER["REQUEST_URI"]) && !current_user_can ("access_s2member_ccap_email"))
{
header ("Location: " . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL);
exit ();
}
}
?>
Statistics: Posted by startasocialnetwork — December 6th, 2010, 1:09 pm