<?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: Getting duplicate user ids from different users when populating field by cookie</title>
		<link>https://legacy.forums.gravityhelp.com/topic/getting-duplicate-user-ids-from-different-users-when-populating-field-by-cookie</link>
		<description>Gravity Support Forums Topic: Getting duplicate user ids from different users when populating field by cookie</description>
		<language>en-US</language>
		<pubDate>Mon, 06 Apr 2026 11:47:51 +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/getting-duplicate-user-ids-from-different-users-when-populating-field-by-cookie" rel="self" type="application/rss+xml" />

		<item>
			<title>wonderboymusic on "Getting duplicate user ids from different users when populating field by cookie"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-duplicate-user-ids-from-different-users-when-populating-field-by-cookie#post-28625</link>
			<pubDate>Mon, 27 Jun 2011 17:35:53 +0000</pubDate>
			<dc:creator>wonderboymusic</dc:creator>
			<guid isPermaLink="false">28625@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;ahh yes, that cookie is being set on login by the java side of the site. It could be an issue on that side.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Carl Hancock on "Getting duplicate user ids from different users when populating field by cookie"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-duplicate-user-ids-from-different-users-when-populating-field-by-cookie#post-28620</link>
			<pubDate>Mon, 27 Jun 2011 17:01:55 +0000</pubDate>
			<dc:creator>Carl Hancock</dc:creator>
			<guid isPermaLink="false">28620@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;How are you setting the value in the cookie?  Because the hidden field is going to be populated using your code above, that is the only place it's going to be able to know that value, so the other piece of this is the cookie itself and the code related to creating the cookie.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>wonderboymusic on "Getting duplicate user ids from different users when populating field by cookie"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/getting-duplicate-user-ids-from-different-users-when-populating-field-by-cookie#post-28616</link>
			<pubDate>Mon, 27 Jun 2011 16:57:52 +0000</pubDate>
			<dc:creator>wonderboymusic</dc:creator>
			<guid isPermaLink="false">28616@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I'm populating a hidden field (snid - a userId, stored as 'sn' in the cookie) with data from the user's cookie. Everything seems to be working correctly, yet when I sort Entries by snid, every 15 or 20 entries has a duplicate snid, everything else captured: name, address, email etc., is fine but somehow the cookie-populated field seems to have carried over to another entry.&#60;br /&#62;
Here is the code for putting the cookie in the form:&#60;/p&#62;
&#60;p&#62;	add_filter(&#34;gform_field_value_snid&#34;, &#34;populate_snid&#34;);&#60;/p&#62;
&#60;p&#62;	function populate_snid() {&#60;br /&#62;
		if ( isset( $_COOKIE['oatmeal'] ) ) {&#60;br /&#62;
			$tmp = $_COOKIE['oatmeal'];&#60;br /&#62;
			$tmp = wp_parse_args( $tmp );&#60;br /&#62;
			$snid_value = $tmp['sn'];&#60;br /&#62;
			if ( strlen( $snid_value ) &#38;lt; 1 ){&#60;br /&#62;
				$snid_value = 'unable to determine snid';&#60;br /&#62;
			}&#60;br /&#62;
		} else {&#60;br /&#62;
			$snid_value = 'no cookie info.';&#60;br /&#62;
		}&#60;br /&#62;
		return $snid_value;&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
