MyBB Community Forums

Full Version: Validate User And Redirect
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hopefully this will be extremely fast. I'm not looking for any full integration, just a simple check.

All I want to do is have a single PHP page, within the MyBB folder, that:

A.) Redirects a user that is already signed into MyBB and is in a particular group.

B.) Redirect someone not signed on to MyBB's logon page.

Cheers

Come to think about it, I really just need to know someone is logged on. So what cookie value would I look for?
If someone's logged in? Off the top of my head, I think that would be:

if $mybb->user['usergroup'] != 1 {
code to be executed
}
else {
code to be executed
}

EDIT: Argh, sorry, mind blank. I fixed my mistake.
Ah see, I knew it was something simple. Thank you very much.