I don't recall ever seeing anything like this. I find it to be a handy addition to AppleScripts in OS X:
set the_user to the second word of (characters (offset of "Users" in path to ¬
preferences as string) through (length of (path to preferences as string)) of ¬
(path to preferences as string) as string)
display dialog "The current user is " & the_user
A simple little thing that might be of benefit.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030307123412518