<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Change blog author</title>
  <link rel="self" href="https://liferay.dev/ca/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121437736" />
  <subtitle>Change blog author</subtitle>
  <id>https://liferay.dev/ca/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121437736</id>
  <updated>2026-05-07T05:52:08Z</updated>
  <dc:date>2026-05-07T05:52:08Z</dc:date>
  <entry>
    <title>RE: Change blog author</title>
    <link rel="alternate" href="https://liferay.dev/ca/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121448270" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/ca/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121448270</id>
    <updated>2022-06-22T12:51:19Z</updated>
    <published>2022-06-22T12:51:18Z</published>
    <summary type="html">&lt;p&gt;For programmatic approaches, I'd look at the anonymization code, that
  replaces the original author with an anonymous user before deleting
  the actual author's user account.&lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2022-06-22T12:51:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: Change blog author</title>
    <link rel="alternate" href="https://liferay.dev/ca/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121438855" />
    <author>
      <name>Tanweer Ahmed .</name>
    </author>
    <id>https://liferay.dev/ca/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121438855</id>
    <updated>2022-06-11T18:01:40Z</updated>
    <published>2022-06-04T15:57:21Z</published>
    <summary type="html">&lt;p&gt;Hi Kristin,&lt;/p&gt;
&lt;p&gt;Not sure if you thought about the approach to solve it
  programmatically - one way would be to use &lt;em&gt;Actionable Dynamic Query&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In case, you go with this approach - use the
  &lt;em&gt;setAddCriteriaMethod&lt;/em&gt; to retrieve the blog list that needs an
  author update and then use &lt;em&gt;setPerformActionMethod&lt;/em&gt; to update
  the Author details.&lt;/p&gt;
&lt;p&gt;Here is how I used it to solve a similar issue related to the Layout entity.&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;private void updateLayouts() throws Exception {

		ActionableDynamicQuery adq = _layoutLocalService.getActionableDynamicQuery();

		adq.setPerformActionMethod(new ActionableDynamicQuery.PerformActionMethod&amp;lt;Layout&amp;gt;() {

			@Override
			public void performAction(Layout layout) {
				try {
					// put the update logic here
				} catch (PortalException e) {
					log.error(e);
				}
			}
		});

		try {
			adq.performActions();
		} catch (Exception e) {
			log.error(e);
		}
	}

	@Reference(unbind = &amp;quot;-&amp;quot;)
	LayoutLocalService _layoutLocalService;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here is a link that describes more about &lt;em&gt;
    &lt;a
      href="https://help.liferay.com/hc/en-us/articles/360030959051-Actionable-Dynamic-Queries"&gt;Actionable
      Dynamic Query&lt;/a&gt; - &lt;/em&gt;&lt;/p&gt;</summary>
    <dc:creator>Tanweer Ahmed .</dc:creator>
    <dc:date>2022-06-04T15:57:21Z</dc:date>
  </entry>
  <entry>
    <title>Change blog author</title>
    <link rel="alternate" href="https://liferay.dev/ca/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121437735" />
    <author>
      <name>Kristen Eis</name>
    </author>
    <id>https://liferay.dev/ca/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121437735</id>
    <updated>2022-06-02T20:04:04Z</updated>
    <published>2022-06-02T16:44:34Z</published>
    <summary type="html">&lt;p&gt;I need to change the author on several published blog posts. Is there
  a way to do that without entirely re-entering/re-publishing the blog post?&lt;/p&gt;</summary>
    <dc:creator>Kristen Eis</dc:creator>
    <dc:date>2022-06-02T16:44:34Z</dc:date>
  </entry>
</feed>
