Code
if (!pnSecAuthAction(0, 'Example::', '::', ACCESS_OVERVIEW)) {
return pnVarPrepHTMLDisplay(_MODULENOAUTH);
}
return pnVarPrepHTMLDisplay(_MODULENOAUTH);
}
I was thinking you could do this with a template to. Where the template just says <--[pnml name="_MODULENOAUTH"]-->
Code
$pnRender =& new pnRender('Example');
if (!pnSecAuthAction(0, 'Example::', '::', ACCESS_OVERVIEW)) {
return $pnRender->fetch('example_noauth.htm');
}
if (!pnSecAuthAction(0, 'Example::', '::', ACCESS_OVERVIEW)) {
return $pnRender->fetch('example_noauth.htm');
}
I'm just wondering why should/shouldn't one do this.
Things i could come up with :
+ Gives the user more freedom to change the appearance of their site.
- If every module makes different looking pages for these securitychecks or errors it will make your site look inconsistent by default.
Something i'm not sure of :
Creating the $pnrender will probably mean extra overhead, but it also gives the possibility to cache it (not that visitors should ever see this pages but....)
What's your opinion about this ?
