This mirrors how SSH_NAME is populated for the user-auth trigger.
Without this, we'd need to duplicate some logic or make it more complex via a plugin trigger.