In InfoPath 2013, it is located in File > Info > Form Options (Advanced Form Options) > Security and Trust. I changed my options to Full Trust. (The form has access to files and settings on the computer).
Then my Username(), worked perfectly to preview.