I am trying to make a conditional statement but I dont know which variable name I should be using. Here is what the statement looks like in php.
Basically I am trying to limit the viewer of a thread to one single usergroup OR the person who started the thread. The person who starts the thread will most certainly NOT be a member of the usergroup allowed to view all threads. Does that make sense.
I know how to write the template conditional and i know how to access the usergroup and userid info. I just need to know how to access the userid for the person who started a thread ($threadStarterUserId).
Thanks
PHP Code:
if ( ($bbuserinfo['usergroupid'] == "12") || ($bbuserinfo['userid'] == $threadStarterUserId) ) {
// Show thread
} else {
// Show a permission denied Error
}
I know how to write the template conditional and i know how to access the usergroup and userid info. I just need to know how to access the userid for the person who started a thread ($threadStarterUserId).
Thanks
Comment