Hide button with various conditions

I want that start when for example they checked the boxes, but always that they are log in.
This code, it tells me that current user isnt defined