I am trying to show the bootstrap alert box based on below condition

```
// These arrays can be empty if not set

$operations = [] // array of operations
$positions = [] // array of posisionts
$employees = [] // array of employess

```

Now I want to show alert box if any of these arrays is empty or the `current employee` is in their respective array. I am stuck to find the robust way to do. As I believe simple `if(){}else{}` condition might not work. Like this what I have tried.

```
if (
    ( empty( $operations ) || in_array( $this->cur_operation, $operations ) ) ||
    ( empty( $positions ) || in_array( $this->cur_position, $positions ) ) ||
    ( empty( $employees ) || in_array( bp_loggedin_user_id(), $employees ) )
) {
    echo ac_get_alert_box( $type, $message, $dismissible, $id );
}

```

This condition is showing alert all the time.

Please help me to solve this issue.

Thanks

Additional Note
===============

Probably I didn't explain well above.

> 
> What I am looking for is whether array is empty or the current user's
> item is in array in both conditions I want to show the alert box
> 
> 
> 

It is kind or permission or rule if it is empty then visible to everyone but if it has a value then show only to the specific user who has the value.