jeudi 4 août 2016

PHP IF Statement ~ IF a statement is met can you have two functions with an OR (||)?

if($USER->id!=$userid)
{
  require_capability('organisation');
}

That is my current code, however where the if statement is met I want to have something like this.

if($USER->id!=$userid)
{
  require_capability('organisation') || require_capability('global')

}

So I want user to run either or and if they have both. Is there anyway to have an OR within the met if statement?

Thanks

Aucun commentaire:

Enregistrer un commentaire