Quote:
Originally posted by Vinney
hi,
how do i get this, only a certain user group can use it, and others get a custom error message ( using a template ) ?
there group i want to only access this is:
usergroupid=2
could anyone help me please ?
thanks for your time - great hack.
|
Sure, but this means guests cannot contact you using the form.
Open contact.php.
Find:
PHP Code:
require('./global.php');
Add BELOW:
PHP Code:
if ($bbuserinfo[usergroupid] !=2 AND $bbuserinfo[usergroupid] !=6 AND $bbuserinfo[usergroupid] !=5) {
eval("standarderror(\"".gettemplate("error_nocontact")."\");");
exit;
}
Make sure you add the usergroupid's of your staff usergroups in there too so they can use the form.
The make a new template called:
error_nocontact
Add this as contents:
Code:
You have no permission to access the contact form.
Or whatever you want.
Done.