If you are looking for a way to capture the login user name in InfoPath try this.
Dim sUserName As String = System.Enviroment.UserName
If you want to capture user name from SharePoint try this:
http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx