PDA

View Full Version : any idea what i might have done wrongly?


Zachery
03-17-2004, 03:29 AM
if (in_array($bbuserinfo['usergroupid'], array(5,6,7)))
{
eval(print_standard_redirect('redirect_reportthank s'));
}
else
{
vbmail_start();
foreach ($mods AS $index => $moderator)
{
if (!empty($moderator['email']))
{
eval(fetch_email_phrases('reportbadpost', $moderator['languageid']));
vbmail($moderator['email'], $subject, $message);
}
}
vbmail_end();
eval(print_standard_redirect('redirect_reportthank s'));
}
}


Im trying to set it up so that if they are a mod/smod/admin they dont get the email if they report it. only if they are a regular user... any ideas?

vB3 RC4 if that matter :)

Velocd
03-17-2004, 04:00 AM
You have an extra closing bracket in there (the last one), unless you accidentally left it in from a larger piece of code where it is required.

The code looks correct otherwise. Maybe check the usergroups to ensure they are 5, 6, and 7?

Zachery
03-17-2004, 04:02 AM
You have an extra closing bracket in there (the last one), unless you accidentally left it in from a larger piece of code where it is required.

The code looks correct otherwise. Maybe check the usergroups to ensure they are 5, 6, and 7?They are, i grabed it from the end of the function, i dont get any errors, just no email :/



its from the end of report.php from RC4 if your wondering

Velocd
03-17-2004, 06:00 AM
just no email :/

Isn't that what you're trying to do? Make usergroups 5, 6, and 7 not receive an email?

Anyway, as said it looks like correct code, I would focus on areas above that portion in the file--maybe there are some other places interferring.

Zachery
03-17-2004, 06:08 AM
Isn't that what you're trying to do? Make usergroups 5, 6, and 7 not receive an email?

Anyway, as said it looks like correct code, I would focus on areas above that portion in the file--maybe there are some other places interferring.
Yes, what i meant was, if a regular user reports a post. no email either.

assassingod
03-17-2004, 01:47 PM
Might need to require a functions_x file to get vbmail_start/end to work (Can't remember if it's might be global or not)