Webform with element that has logged in user's username
You can create a Value element with a token to capture and store the current user's name.

name:
 '#title': 'User Name'
 '#type': value
 '#value': '[current-user:name]'