I ran into a situation where a site owner wanted to restrict the items a user could see based on the current username. I am aware that using the standard data view you can filter by current user but this only works on display name which doesn't help if you have two users with the same name. So we added a username column which held 'DOMAIN\User' to identify which list items where allocated to a particular user.
Next you have to go into the web part properties for the list data view and edit the Parameter Bindings
find the line
<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
modify this line to:
<ParameterBinding Name="UserID" Location="ServerVariable(AUTH_USER)" DefaultValue="CurrentUserName"/>
There you have it. A List filtering on a unique domain user name rather then display name
Next you have to go into the web part properties for the list data view and edit the Parameter Bindings
find the line
<ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
modify this line to:
<ParameterBinding Name="UserID" Location="ServerVariable(AUTH_USER)" DefaultValue="CurrentUserName"/>