Are you sure those are the correct cookie names? The code for determining the cookie prefix is:
Code:
define('COOKIE_PREFIX', (empty($this->config['Misc']['cookieprefix']) ? 'bb' : $this->config['Misc']['cookieprefix']) . '_');
So I think it would be "bb_userid" unless you have something else defined in config.php.
Maybe it would be better to include config.php before the check and use the above code, like:
Code:
include('includes/config.php');
define('COOKIE_PREFIX', (empty($config['Misc']['cookieprefix']) ? 'bb' : $config['Misc']['cookieprefix']) . '_');
if ($_COOKIE[COOKIE_PREFIX . 'userid']==0 || $_COOKIE[COOKIE_PREFIX . 'userid']==null)
{ die('You must be logged in to reset dismissed notices.'); }
Also, where is the script that you're running? If it's not in the same directory as the vb scripts then you need to have "Path to Save Cookies" (under Cookies and HTTP Header Options) set to / or else the cookies won't be sent to your script.
Checking the cookies doesn't give you much security - anyone could send a fake cookie and it only needs to have a non-zero userid. If this is a concern you could include the vb global.php in your script then check to see if the user is actually logged in.