SyntaxFix
Write A Post
Hire A Developer
Questions
Using user.name is not secure as environment variables can be faked. Method you were using is good, there are similar methods for unix based OS as well
user.name