<?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>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>I have a web-enabled InfoPath form where I want to do some user checks.</title><link>https://www.infopathdev.com:443/forums/thread/37450.aspx</link><pubDate>Wed, 21 Jan 2009 12:23:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37450</guid><dc:creator>dennisc</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37450.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=37450</wfw:commentRss><description>&lt;p&gt;I want to check if the logged on user (Active Directory) is equal to the Created By field from a SharePoint list object. (Object can be a InfoPath form or word document or what ever…)&lt;br /&gt;&lt;br /&gt;I can retrieve the Created By and Modified By field from a SharePoint list.&lt;br /&gt;But the Created By field in SharePoint has the value of Display Name in Active Directory of that corresponding user.&lt;br /&gt;&lt;br /&gt;Is there a way to retrieve the username or SID of the user who created the object in the list?&lt;br /&gt;(I want to keep the Display Name in Active Directory)&lt;br /&gt;&lt;br /&gt;I retrieve the current logged on user with:&lt;br /&gt;&lt;i&gt;System.Security.Principal.WindowsIdentity user_id;&lt;br /&gt;user_id = System.Security.Principal.WindowsIdentity.GetCurrent();&lt;br /&gt;&lt;br /&gt;string strSID = user_id.User; // Unique system id&lt;br /&gt;string strUserName = user_id.Name.ToString(); // Username&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I retrieve the Created By field with a DataSource Connection also in InfoPath&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>