I have a little problem. I wish to create an IF statement, that shall react like this:
- If user is NOT admin (forum_admin) AND they are not the owner of the ticket (userid), BUT moderators are allowed to view tickets (allow_moderator_tickets) AND user is moderator (forum_moderator), then he should be allowed to view the ticket.
How can I obtain this with a PHP if statement.
So far I have this:
//If user is not allowed to view.
if($userdata['forum_admin']==0 && $ticketDetails['userid']!=$userdata['id'] || $sdata['allow_moderator_ticket']==0 && $userdata['forum_moderator']==1)
redirect("?i=a");
1 Answer