I have a web-enabled InfoPath form where I want to do some user checks. - InfoPath Dev
in

InfoPath Dev

I have a web-enabled InfoPath form where I want to do some user checks.

Last post 01-21-2009 04:23 AM by dennisc. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 01-21-2009 04:23 AM

    I have a web-enabled InfoPath form where I want to do some user checks.

    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…)

    I can retrieve the Created By and Modified By field from a SharePoint list.
    But the Created By field in SharePoint has the value of Display Name in Active Directory of that corresponding user.

    Is there a way to retrieve the username or SID of the user who created the object in the list?
    (I want to keep the Display Name in Active Directory)

    I retrieve the current logged on user with:
    System.Security.Principal.WindowsIdentity user_id;
    user_id = System.Security.Principal.WindowsIdentity.GetCurrent();

    string strSID = user_id.User; // Unique system id
    string strUserName = user_id.Name.ToString(); // Username


    I retrieve the Created By field with a DataSource Connection also in InfoPath

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.