<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Environment.UserName</title><link>https://www.infopathdev.com:443/forums/thread/64798.aspx</link><pubDate>Thu, 03 Mar 2011 20:35:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64798</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64798.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=64798</wfw:commentRss><description>&lt;p&gt;Remove the code and just use the xpath username() function that was new in InfoPAth 2007.&lt;/p&gt;</description></item><item><title>Environment.UserName</title><link>https://www.infopathdev.com:443/forums/thread/64797.aspx</link><pubDate>Thu, 03 Mar 2011 20:19:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64797</guid><dc:creator>steve</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64797.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=64797</wfw:commentRss><description>Long ago somebody on our team developed a bunch of InfoPath forms that used the following code to figure out who the user is:

somevariable  = Environment.UserName

works and is simple, but causes a lot of security issues depending on how the user&amp;#39;s pc is setup.  Also makes it necessary to add the URL to IE security.

Now these forms have to be changed for a much-delayed migration to SharePoint 2007.

Is there a better way to figure out the user information that&amp;#39;s both not too complicated and doesn&amp;#39;t require full-trust?

the code was developed using Visual Studio and VB.

any guidance would be much appreciated!

thanks</description></item></channel></rss>