Well... I'm no programmer, but here's a start.
code:
break on

$domain = "@LDOMAIN"
$userid = "@UserID"

$user = getobject("WinNT://$domain/$userid,user")

if $user
For each $Object in $User.LoginWorkstations
? $Object
Next
endif

? "Done"
get $_

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.