<?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: Change user role after completing form</title>
		<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form</link>
		<description>Gravity Support Forums Topic: Change user role after completing form</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 15:27:04 +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/cange-user-role-after-completing-form" rel="self" type="application/rss+xml" />

		<item>
			<title>recadmin on "Change user role after completing form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form#post-215952</link>
			<pubDate>Fri, 19 Apr 2013 17:30:32 +0000</pubDate>
			<dc:creator>recadmin</dc:creator>
			<guid isPermaLink="false">215952@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Just wanted to update this post.&#60;br /&#62;
We were having issues with mixing data input form with file uploads on one form, so I made another form to be loaded after the data input form was complete, that is just for photo uploads.&#60;br /&#62;
When I created the User Registration connection to Update User, I realized I could choose a different Role from the dropdown that changes the Role on form complete.&#60;br /&#62;
The only problem now is that I wanted to deny user the ability to log in, which this does not fix...&#60;br /&#62;
I will investigate creating a new role that denies login.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>recadmin on "Change user role after completing form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form#post-197914</link>
			<pubDate>Fri, 05 Apr 2013 16:27:32 +0000</pubDate>
			<dc:creator>recadmin</dc:creator>
			<guid isPermaLink="false">197914@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm still looking to resolve this issue&#60;/p&#62;
&#60;p&#62;Thnx
&#60;/p&#62;</description>
		</item>
		<item>
			<title>recadmin on "Change user role after completing form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form#post-194687</link>
			<pubDate>Tue, 02 Apr 2013 18:09:01 +0000</pubDate>
			<dc:creator>recadmin</dc:creator>
			<guid isPermaLink="false">194687@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Yes, form is requiring user to be logged in, and user is logged in.&#60;br /&#62;
I am using my current theme's functions.php, not a plugin.&#60;br /&#62;
I have replaced 'get_current_user_id()' with your snippet.&#60;/p&#62;
&#60;p&#62;Result still does not display user_id on form complete, user is still set to Subscriber.&#60;/p&#62;
&#60;p&#62;Thnx
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Change user role after completing form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form#post-194677</link>
			<pubDate>Tue, 02 Apr 2013 17:59:39 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">194677@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;That would explain why it's not working.  However, we need to figure out why $user_id is empty.&#60;/p&#62;
&#60;p&#62;Instead of using get_current_user_id() can you try this code (just as a test)?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
global $current_user;
get_currentuserinfo();
$user_id = $current_user-&#38;gt;ID;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Are you doing this in the theme's functions.php or a plugin you created?&#60;/p&#62;
&#60;p&#62;Is the user already logged in when attempting to use this functionality?  As David stated previously &#34;If the user is not logged in, nothing will happen:&#34;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>recadmin on "Change user role after completing form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form#post-194650</link>
			<pubDate>Tue, 02 Apr 2013 17:24:12 +0000</pubDate>
			<dc:creator>recadmin</dc:creator>
			<guid isPermaLink="false">194650@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;OK, I updated the code on my pastebin to reflect what I am currently testing with.&#60;br /&#62;
I have reverted back to using:&#60;br /&#62;
$user_id = get_current_user_id();&#60;/p&#62;
&#60;p&#62;I added the echo $user_id;&#60;/p&#62;
&#60;p&#62;I was pushing to a display page, so I changed to a simple msg for testing.&#60;/p&#62;
&#60;p&#62;On complete, I only see my simple msg and no user_id
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Change user role after completing form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form#post-194594</link>
			<pubDate>Tue, 02 Apr 2013 15:58:25 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">194594@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;The code should be in your current theme's functions.php&#60;/p&#62;
&#60;p&#62;On line 8, add an echo statement: &#60;strong&#62;echo $user_id;&#60;/strong&#62; and see if it contains the proper user ID.  That will also show you that the code is being processed for sure.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>recadmin on "Change user role after completing form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form#post-194581</link>
			<pubDate>Tue, 02 Apr 2013 15:46:42 +0000</pubDate>
			<dc:creator>recadmin</dc:creator>
			<guid isPermaLink="false">194581@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Ok, I have tried changing that and a few other things that I suspected might be causing this not to work.  I am questioning if&#60;br /&#62;
   A) it is properly pulling the user_id?&#60;br /&#62;
   B) it is supposed to be in functions.php? (maybe in form_display.php instead?)&#60;/p&#62;
&#60;p&#62;Here is the code with edits commented out:&#60;br /&#62;
&#60;a href=&#34;http://pastebin.com/N8rP1qsA&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/N8rP1qsA&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thnx
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Change user role after completing form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form#post-193596</link>
			<pubDate>Mon, 01 Apr 2013 21:37:58 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">193596@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This code will work, but you need to  change the name of the hook from gform_post_submission to gform_after_submission.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>recadmin on "Change user role after completing form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form#post-193321</link>
			<pubDate>Mon, 01 Apr 2013 16:55:10 +0000</pubDate>
			<dc:creator>recadmin</dc:creator>
			<guid isPermaLink="false">193321@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I would like to revive this old post.&#60;br /&#62;
Currently using the latest gravity forms and user registration addon, i have been able to get all of the following working:&#60;br /&#62;
user registers using 'form 1' which creates user and sets user role to 'Pending'&#60;br /&#62;
admin gets email, verifies user info, uses 'New User Approve plugin' to approve, user role gets set to 'Subscriber', and user gets new password and login info by email&#60;br /&#62;
on user login, 'Theme My Login plugin' pushes user to 'form 2' which 'updates' user info, displays 'thank you' page that automatically logs user out&#60;/p&#62;
&#60;p&#62;*** HERE is where I need help!... on 'form submission' I would like the following to happen:&#60;br /&#62;
user role set to 'None'&#60;/p&#62;
&#60;p&#62;I tried the example posted by David Smith here:&#60;br /&#62;
&#60;a href=&#34;http://pastie.org/2874838&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/2874838&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Placed in my functions.php and adjusted to proper form number, but it is not changing the user's role.&#60;br /&#62;
Just wondering if anyone got this to work?  What am I missing?&#60;br /&#62;
Thnx
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Change user role after completing form"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/cange-user-role-after-completing-form#post-47954</link>
			<pubDate>Tue, 31 Jan 2012 17:56:20 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">47954@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Jacques,&#60;/p&#62;
&#60;p&#62;Currently there is no simple way to accomplish conditional roles. If you are interested in coding a custom solution, I'd be happy to give you some pointers.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
