<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Set the lead &#34;created_by&#34; field to newly created user</title>
		<link>https://legacy.forums.gravityhelp.com/topic/set-the-lead-created_by-field-to-newly-created-user</link>
		<description>Gravity Support Forums Topic: Set the lead &quot;created_by&quot; field to newly created user</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 12:06:39 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/set-the-lead-created_by-field-to-newly-created-user" rel="self" type="application/rss+xml" />

		<item>
			<title>Brian on "Set the lead &#34;created_by&#34; field to newly created user"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/set-the-lead-created_by-field-to-newly-created-user#post-317082</link>
			<pubDate>Tue, 11 Jun 2013 10:14:10 +0000</pubDate>
			<dc:creator>Brian</dc:creator>
			<guid isPermaLink="false">317082@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Got it.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;gform_user_registered&#38;#39;, &#38;#39;gfee_update_created_by&#38;#39;, 10, 4);
function gfee_update_created_by($user_id, $config, $lead, $user_pass) {
	global $wpdb;
	$lead_table = RGFormsModel::get_lead_table_name();
	$lead_id = $lead[&#38;#39;id&#38;#39;];
	$wpdb-&#38;gt;query($wpdb-&#38;gt;prepare(&#38;quot;UPDATE $lead_table SET created_by=$user_id WHERE id=$lead_id&#38;quot;));

}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Brian on "Set the lead &#34;created_by&#34; field to newly created user"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/set-the-lead-created_by-field-to-newly-created-user#post-317052</link>
			<pubDate>Tue, 11 Jun 2013 09:54:51 +0000</pubDate>
			<dc:creator>Brian</dc:creator>
			<guid isPermaLink="false">317052@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have created a plugin that allows users to edit their entries since it is not available through gravity forms yet. It relies on the &#34;created_by&#34; field to display the entries back to the user, I am also using the &#34;User Registration&#34; plugin to create a new user if not logged in. Is there an easy way to set the &#34;created_by&#34; field to the newly created user?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
