1 (edited by bzx 2006-09-08 14:06)

Topic: how to force authentication in a mod?

hey there

i installed the Calendar mod for PunBB - i'm just wondering if it's possible to allow the Calendar only for logged in users? by default, it is accessible to all...

what's the magic line for login check?

thanks !!

---

found it here: http://punbb.org/forums/viewtopic.php?id=12664
topic closed

Re: how to force authentication in a mod?

It's been a while since I've messed with punbb but I'm pretty sure this will work.

if ($pun_user['is_guest'] && $pun_user['g_read_board'] == '0')
        message($lang_common['No permission']);

Just insert this code into the pages you don't want your guest to see.

Re: how to force authentication in a mod?

Just the is_guest bit wink