<?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: Username of First name and first letter Last name</title>
		<link>https://legacy.forums.gravityhelp.com/topic/username-of-first-name-and-first-letter-last-name</link>
		<description>Gravity Support Forums Topic: Username of First name and first letter Last name</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:27:10 +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/username-of-first-name-and-first-letter-last-name" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Username of First name and first letter Last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/username-of-first-name-and-first-letter-last-name#post-114687</link>
			<pubDate>Sat, 05 Jan 2013 09:05:34 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">114687@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Line 05 should look more like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$username = strtolower(rgpost(&#38;#39;input_1_3&#38;#39;) . &#38;#39; &#38;#39; . substr(rgpost(&#38;#39;input_1_6&#38;#39;), 0, 1));&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That assumes field 1 is your name field.  If not, the 1_3 and 1_6 will need to change.&#60;/p&#62;
&#60;p&#62;Also, you said &#34;Robert R&#34; but this will create &#34;robert r&#34; since you are using strtolower.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>RobertR on "Username of First name and first letter Last name"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/username-of-first-name-and-first-letter-last-name#post-114275</link>
			<pubDate>Fri, 04 Jan 2013 22:48:42 +0000</pubDate>
			<dc:creator>RobertR</dc:creator>
			<guid isPermaLink="false">114275@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Is it possible to assign a username to a new user using the First Name + 1st letter of the Surname? Like Robert R., I think I'm in the right direction using &#60;a href=&#34;http://php.net/manual/en/function.substr.php&#34; rel=&#34;nofollow&#34;&#62;http://php.net/manual/en/function.substr.php&#60;/a&#62;&#60;br /&#62;
but can't get it work. Any suggestions on this are welcome!&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
       add_filter(&#38;#39;gform_username&#38;#39;, &#38;#39;auto_username&#38;#39;);
function auto_username($username){

    $username = strtolower(rgpost(&#38;#39;input_1_3&#38;#39;) . $string[0];(rgpost(&#38;#39;input_1_4&#38;#39;)));

    if(empty($username))
        return $username;

    if(!function_exists(&#38;#39;username_exists&#38;#39;))
        require_once(ABSPATH . WPINC . &#38;quot;/registration.php&#38;quot;);

    if(username_exists($username)){
        $i = 2;
        while(username_exists($username . $i)){
            $i++;
        }
        $username = $username . $i;
    };

    return $username;
}
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
