Oh I'm sorry I understand found it I will play with the code and see if I can find what is causing it, thanks Lynne!
--------------- Added 25 Feb 2011 at 07:43 ---------------
Sadly I have not been able to get this to work so it promts admins and mods a forum password on each session because I am dumb when it comes to php (know very little) if anyone who has an understanding of what part of this function I should edit it would be great. So far I've just been breaking it and spitting errors at me all morning
PHP Code:
function verify_forum_password($forumid, $password, $showerror = true)
{
global $vbulletin, $stylevar;
if (!$password OR ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) OR ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator']) OR can_moderate($forumid))
{
return true;
}
$foruminfo = fetch_foruminfo($forumid);
$parents = explode(',', $foruminfo['parentlist']);
foreach ($parents AS $fid)
{ // get the pwd from any parent forums -- allows pwd cookies to cascade down
if ($temp = fetch_bbarray_cookie('forumpwd', $fid) AND $temp === md5($vbulletin->userinfo['userid'] . $password))
{
return true;
}
}
// didn't match the password in any cookie
if ($showerror)
{
require_once(DIR . '/includes/functions_misc.php');
$security_token_html = '<input type="hidden" name="securitytoken" value="' . $vbulletin->userinfo['securitytoken'] . '" />';
// forum password is bad - show error
eval(standard_error(fetch_error('forumpasswordmissing',
$vbulletin->session->vars['sessionhash'],
$vbulletin->scriptpath,
$forumid,
construct_post_vars_html() . $security_token_html,
$stylevar['cellpadding'],
$stylevar['cellspacing']
)));
}
else
{
// forum password is bad - return false
return false;
}
}