if($user != "someone") {
...... //log user in file
}
ok, lets pseudocode this for you 😉
IF user IS NOT EQUAL TO "someone" THEN
Do stuff
END IF
CONTINUE SCRIPT
It's doing exactly what you want, but opposite to what you're thinking. When it gets to that point in the script, it will run the stuff inside the if statement, if the user is NOT equal to your condition, otherwise it just skips all that stuff completely.
Hope that helps 🙂