Check whether username matches the current effective user.
Compares the uid of the named user against the process's effective UID, so it works correctly in setuid scenarios.
login name to compare against
true if the user exists and their uid equals geteuid().
import unit_threaded.assertions; isCurrentUser(getCurrentUser().name).shouldBeTrue; isCurrentUser("this_user_definitely_does_not_exist_xyzzy").shouldBeFalse;
See Implementation
Check whether username matches the current effective user.
Compares the uid of the named user against the process's effective UID, so it works correctly in setuid scenarios.