• http://www.davidtucker.net David Tucker

    It is important to remember that there are situations where the user directory name will not equal the username. For example, if the user changes their username, the directory will still retain the old name (at least on Mac).

  • John C. Bland II

    Very good point David. Any solid way to gain the username? For me, this works ’cause this is a corporate environment where usernames are set.