Condition OR for current user ID

You do not want an OR, you want an AND.

Follow it through and substitute the values. If we are user 1, then it’s true because we are not user 2, and true OR false resolves to true. Only one of them needs to be true for an OR to be true. If we are user 2, then it’s true because we are not user 1, and false OR true also resolves to true.

Remember, a or b is true if A, B, or both are true. I know what you meant, but the computer does not, and you have to be extremely exact.

When you say I do not want A or B, what you really meant was I do not want A and I do not want B.

so replace this:

if user is not 1 or user is not 2

with:

if user is not 1 and user is not 2

Or better yet:

if user is not in this array [ 1, 2]