so im trying to display a link to that is only available to certain users.
i embedded this script into the page
<php>
func();
function func(){
global $INFO;
if ($INFO['userinfo']['grps'][0] != null){
$canEdit = false;
foreach($INFO['userinfo']['grps'] as $grp){
if($grp == 'admin'){
$canEdit = true;
echo '<a href="http://localhost/dokuwiki/php_dir/redirect.php?perm=edit">Edit Directory</a>';
}
}
}
echo '<a href="http://localhost/dokuwiki/php_dir/redirect.php"> | View Directory</a>';
}
</php>
and this works just fine in the preview, but never works correctly when i save it.
not really sure what I'm doing wrong, and any help would be much appreciated.
Thanks!