We help IT Professionals succeed at work.

Getting the creator of a control

1,376 Views
Last Modified: 2012-06-27
In Sharepoint, can we get the name of the user who has created a control (for ex, a list control)? I have not found anyway to get it.
Comment
Watch Question

The only way to do this is directly from the SQL database.  These instructions are specific to 2010, however 2007 is similar (might just need to look at a different view or table):

1) Get the List ID.  You can do this by going to the list in the web browser and going to the List Settings.  The URL should have something like:

/_layouts/listedit.aspx?List=%7BC758FFC6%2DD14F%2D4820%2D8EE2%2D8805C1EE1B41%7D

%7BC758FFC6%2DD14F%2D4820%2D8EE2%2D8805C1EE1B41%7D is the List ID in a URL encoded format.  Remove %7B and %7D from the beginning and the end and replace the %2D's with hyphens (-).  In this example it would be: C758FFC6-D14F-4820-8EE2-8805C1EE1B41

2) With SQL Server Management Studio, connect to the SQL server for the SharePoint Site and goto the Content database for the site collection you are working with (something like WSS_Content, yada yada yada).

3) Query the dbo.Lists view where the tp_ID is equal to the List ID we just got.

For example:

SELECT *
  FROM [WSS_Content].[dbo].[Lists]
  WHERE [tp_ID] = 'C758FFC6-D14F-4820-8EE2-8805C1EE1B41'

4) Get the tp_Author value.  This is the SharePoint database ID for the user in question.

5) Query the dbo.UserInfo table where the tp_ID is equal to the author ID you just retrieved

For example:

SELECT *
  FROM [WSS_Content].[dbo].[UserInfo]
  WHERE tp_ID = '1073741823'

6) This may display multiple records, but it will all be the same user.  The tp_Login field will display the Active Directory account you are looking for.
I just verified and the 2007 database structure for this information is the same.  The above solution works for both versions.
Also, for SharePoint 2010 only, it is possible to get this with PowerShell.  Open up the SharePoint 2010 PowerShell and enter the following commands:

$web = Get-SPWeb "http://yoursiteurl"
$list = $web.lists["Your List Name"]
$listAuthor = $list.Author
Write-Host $listAuthor

This will display the AD account that created the specific list.

Author

Commented:
I am sorry, I didn't get a chance to check your responses. I don't have access to SQL Server but I have have FULL CONTROL on our site in Sharepoint. It is Sharepoint 2007.
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.