AAron nAAs

All MindsharpBlogs

AAron's SharePoint notepad

My Links

Archives

Blog Stats

My Sites

Modify Owner of a Discussion Posting

I have recently been building an internal special interest community site, and wanted to prepopulate the site with some postings. The problem is that *I* will be creating the postings on the “Question and Answer” discussion boards, and I wanted to post some questions from other users... so I wanted to impersonate someone and do the posting. For a quick solution, I created the posting, then went into the database and changed the owner of the post. Here's how I did it.

Connect to your content database with the Query tool.

Determine the SiteId and GUID of your posting by title:

select tp_SiteId, tp_GUID, tp_Author, tp_Editor, tp_Created, tp_Modified, nvarchar1, ntext2 from dbo.UserData
where nvarchar1 = 'the title'

Then get a list of users for the SiteId:

select tp_ID, tp_SiteAdmin, tp_Login, tp_Title, tp_Email from dbo.UserInfo
where tp_SiteID = 'EEC6FD27-D497-48AD-2F6D-E9A21FD2EC62'

Update the post with the appropriate user ID for that SiteId:

update dbo.UserData set tp_Author = 2
where tp_GUID = '9FE18320-7273-4AC8-9248-5A581551ED0A'

 

posted on Thursday, December 29, 2005 11:40 AM

Feedback

# re: Modify Owner of a Discussion Posting 12/30/2005 7:52 PM Soody

Hi Aaron,

you solution looks good but this will not get supported by Microsoft. Microsoft will not allow and support any direct update to userdata table.

for more read the sharepoint SDK

regards
Soody

# re: Modify Owner of a Discussion Posting 1/4/2006 7:15 AM AAron

There are many things that you can change that Microsoft will not support. Yes, this is one of them.

I am an advocate of using supportable mechanisms, and I also know the value of a focused "quick hack."

# re: Modify Owner of a Discussion Posting 1/11/2006 4:32 AM Todd Bleeker

"Quick hack". I love it! : )

<Todd />

Title  
Name  
Url
CAPTCHA
Protected by Clearscreen.SharpHIPEnter the code you see:
Comments