+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Change owner of Blog Post?

Change owner of Blog Post?

7 posts, 0 answered
  1. michaelroper
    michaelroper avatar
    18 posts
    Registered:
    25 Jul 2012
    20 Aug 2012
    Link to this post
    Given all the fine-grained permissions in SF, i thought it would have been easy to change the owner/author of a blog post, but apparently not. Or maybe it is? Please, can someone enlighten me?
  2. Daniel Plomp
    Daniel Plomp avatar
    952 posts
    Registered:
    18 Feb 2004
    20 Aug 2012
    Link to this post
    Hi Michael,

    I'm afraid you should do this manually, if you want this. Instead of doing this right in the database, I suggest to use the API.

    If it is because you want to show another 'name' with your blogpost, I think you'd be better off to create a custom field for the BlogPost and add an 'Author' field.

    Regards,
    Daniel
  3. Jason
    Jason avatar
    3 posts
    Registered:
    13 Mar 2008
    20 Aug 2012
    Link to this post
    Why is there a permission to change the blog post owner if it is not possible?
  4. Liz
    Liz avatar
    1 posts
    Registered:
    18 Apr 2013
    18 Apr 2013
    Link to this post
    I have the same question...since the permission exists to change a blog post's owner, I thought there would be an action or other option to change a blog post's owner. Is this coming in a future relase? I am currently using 5.4.
  5. Richard
    Richard avatar
    103 posts
    Registered:
    04 Apr 2013
    11 Jan 2015
    Link to this post
    Sweet,.. just got to this question in 2015. Can't find this though in SF 6.3.5000. Maybe it's in 7.3? Can anyone confirm? I will resort to API,. which explains why there is a permission setting for it, albeit, it'd be nice for the backend admin pages to include this fine functionality :P
  6. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    28 Sep 2016
    14 Jan 2015
    Link to this post
    Hi Richard,

    Currently, it is not possible to change the owner of a content item through the Sitefinity backend UI. We have logged this as a feature request in our feedback portal on the following link and we hope that we will have this functionality out of the box for our future releases.

    Currently, you can change the owner of a content item using our API. There is an Owner property for every content item so if you use for example our sample for Modifying blog posts from this documentation article, you could set the new Owner. Here is a sample code for your convenience for changing the owner of a blog post:

    private void ChangeNewsOwner(string blogPostTitle, string adminUserName)
            {
                BlogsManager blogsManager = BlogsManager.GetManager();
     
                //Get the master version.
                BlogPost master = blogsManager.GetBlogPosts().Where(b => b.Title == blogPostTitle && b.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Master).FirstOrDefault();
     
                if (master != null)
                {
                    // Find the user who will be the new Owner
                    UserManager usermanager = UserManager.GetManager();
                    var adminUser = usermanager.GetUsers().Where(u => u.UserName == adminUserName).FirstOrDefault();
     
                    if (adminUser != null)
                    {
                        master.Owner = adminUser.Id;
                    }
     
                    master.LastModified = DateTime.UtcNow;
     
                    blogsManager.Lifecycle.Publish(master);
                    blogsManager.SaveChanges();
     
                    //Publish the news item.
                    var bag = new Dictionary<string, string>();
                    bag.Add("ContentType", typeof(BlogPost).FullName);
                    WorkflowManager.MessageWorkflow(master.Id, typeof(BlogPost), null, "Publish", false, bag);
                }
            }


    Regards,
    Sabrie Nedzhip
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  7. Richard
    Richard avatar
    103 posts
    Registered:
    04 Apr 2013
    28 May 2015 in reply to Sabrie Nedzhip
    Link to this post
    Sabrie! Works. Thanks. Made a widget out of this. 
7 posts, 0 answered