Sort of.
It's not clear from the original posting whether there was an altermate
action on if they didn't match ( there is no closing brace, so it
looks like a snippet rather than the whole routine.)
e.g
if ( UserIDs == ThisUserID) {
return true;
}
else {
LogErrorMessage();
DoInterestingThings();
}
If the only thing that the routine does is check the validity of the
user ID and return true/false, then
return (UserIDs == ThisUserID);
does suffice.
Alan.