Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm building a WebServices tha allows user from a social network to add a new FILE in a DoCLibrary. This WebServices' WSDl ,was built with no "USERID" field . Every time that someone add a new file on sharepoint, it's created as "SHAREPOINT/SYSTEM" author. So, every Domain user has his own account on sharepoint that is the same on the web site social network. I need to knows how can I get the user instance that is logged on the WebSite , that is adding a new file on SP, to modify that "FILE AUTHOR"field on sharepoint ?

share|improve this question
    
Just to clarify what your asking... Once a user adds a new file, the web service should check if the user exists and if so add the user as the author, but if not, to create the user account on the domain, and then add the user as author? –  Zork Mar 30 '12 at 15:52
    
no, the user already exists on the domain. Both SP userid and Social Network userid are gotten gotten by domain. But when call the web services method which adds a file, the wsdl doesn't have the user id field but only "fileName, fileID, contentID," When the file is created, it's created with Author property ="Sharpoint\system". That's because the web services method works with "Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(delegate()" –  Bruno Ferreira Mar 31 '12 at 20:13
add comment

1 Answer 1

You can create a textbox set it to read only and in the default value settings feild under properties, you can add a function in this case UserName() which will pull from active directory.

I hope this is what you were looking for.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.