<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: sfDoctrineGuardPlugin: Signup, Validation and Profile</title>
	<atom:link href="http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/</link>
	<description>Thoughts on Web Development, Infrastructure and Application Scalability</description>
	<lastBuildDate>Thu, 22 Dec 2011 14:24:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: rp</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/comment-page-1/#comment-4615</link>
		<dc:creator>rp</dc:creator>
		<pubDate>Tue, 13 Dec 2011 16:32:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434#comment-4615</guid>
		<description>You can place it anywhere you like really, i usually put it in the lib/ directory, the autoloader picks it up</description>
		<content:encoded><![CDATA[<p>You can place it anywhere you like really, i usually put it in the lib/ directory, the autoloader picks it up</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rp</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/comment-page-1/#comment-4614</link>
		<dc:creator>rp</dc:creator>
		<pubDate>Tue, 13 Dec 2011 16:28:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434#comment-4614</guid>
		<description>This is just to show that you can override and use your own custom domain model</description>
		<content:encoded><![CDATA[<p>This is just to show that you can override and use your own custom domain model</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/comment-page-1/#comment-4597</link>
		<dc:creator>Roy</dc:creator>
		<pubDate>Fri, 25 Nov 2011 18:51:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434#comment-4597</guid>
		<description>I see that you&#039;ve created first_name and last_name columns in the profile table, ignoring the ones that are already in sf_guard_user table. Is there a specific reason for this? Should I be doing the same?</description>
		<content:encoded><![CDATA[<p>I see that you&#8217;ve created first_name and last_name columns in the profile table, ignoring the ones that are already in sf_guard_user table. Is there a specific reason for this? Should I be doing the same?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: javier</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/comment-page-1/#comment-4583</link>
		<dc:creator>javier</dc:creator>
		<pubDate>Mon, 14 Nov 2011 20:36:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434#comment-4583</guid>
		<description>Where do I add the class RegisterForm.class.php ?</description>
		<content:encoded><![CDATA[<p>Where do I add the class RegisterForm.class.php ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Janos Krnak</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/comment-page-1/#comment-4228</link>
		<dc:creator>Janos Krnak</dc:creator>
		<pubDate>Sun, 15 May 2011 12:54:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434#comment-4228</guid>
		<description>Great post Rajat! Helped me a lot!

Cheers</description>
		<content:encoded><![CDATA[<p>Great post Rajat! Helped me a lot!</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ido Schacham</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/comment-page-1/#comment-4186</link>
		<dc:creator>Ido Schacham</dc:creator>
		<pubDate>Tue, 05 Apr 2011 11:39:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434#comment-4186</guid>
		<description>It seems that:
  columns:
    user_id:                      { type: integer(4), notnull: true}

Isn&#039;t correct for the latest version of sfDoctrineGuardPlugin, it should be:
  columns:
    user_id:                      { type: integer, notnull: true}</description>
		<content:encoded><![CDATA[<p>It seems that:<br />
  columns:<br />
    user_id:                      { type: integer(4), notnull: true}</p>
<p>Isn&#8217;t correct for the latest version of sfDoctrineGuardPlugin, it should be:<br />
  columns:<br />
    user_id:                      { type: integer, notnull: true}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aBo</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/comment-page-1/#comment-4160</link>
		<dc:creator>aBo</dc:creator>
		<pubDate>Mon, 28 Mar 2011 19:39:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434#comment-4160</guid>
		<description>maybe it will help you somehow: (my example... and thx for all information in this site)

private function notifySignup($user, $profile) {
        $activationUrl = &quot;http://www.event.com/index.php/register/activation/?member=&quot; . $user-&gt;getId() . &quot;&amp;activation=&quot; . $profile-&gt;getToken();
        $message = $this-&gt;getMailer()-&gt;compose(
                        &#039;info@megasale.am&#039;,
                        &#039;info@megasale.am&#039;/* $mailerarraystuff[0] */,
                        &#039;&#039; . $user-&gt;getEmailAddress() . &#039;&#039;, &#039;Shnorhakalutyun grancman hamar
                                            Grancumn aktivacnelu hamar ayceleq hetvevyal hasceov: &#039;
                        . $activationUrl . &#039; //Megasale&#039;);
        $message-&gt;setBcc($singleUserMail[0][&#039;email_address&#039;]);
        //$this-&gt;getMailer()-&gt;send($message);        
    }

    public function executeActivation(sfWebRequest $request) {
        if ($request-&gt;isMethod(&#039;get&#039;)) {
            $this-&gt;memberId = $request-&gt;getParameter(&#039;member&#039;);
            $this-&gt;activationId = $request-&gt;getParameter(&#039;activation&#039;);

            $q2s = Doctrine_Query::create()-&gt;select(&#039;p.id &#039;)
                            -&gt;from(&#039;sfGuardUserProfile p&#039;)
                            -&gt;where(&#039;p.token = ?&#039;, $this-&gt;activationId );

            $getUserId = $q2s-&gt;fetchArray();
            $this-&gt;activated = 0;
            if (sizeof($getUserId[0][id])) {

            Doctrine_Query::create ()
                        -&gt;update(&#039;sfGuardUser u&#039;)
                        -&gt;set(&#039;u.is_active&#039;, 1)
                        -&gt;where(&#039;u.id = ?&#039;, $getUserId[0][id])-&gt;execute();
            $this-&gt;activated = 1;
            }
        }
        
    }
    public function executeActivationgo(sfWebRequest $request) {
        
    }</description>
		<content:encoded><![CDATA[<p>maybe it will help you somehow: (my example&#8230; and thx for all information in this site)</p>
<p>private function notifySignup($user, $profile) {<br />
        $activationUrl = &#8220;http://www.event.com/index.php/register/activation/?member=&#8221; . $user-&gt;getId() . &#8220;&amp;activation=&#8221; . $profile-&gt;getToken();<br />
        $message = $this-&gt;getMailer()-&gt;compose(<br />
                        &#8216;info@megasale.am&#8217;,<br />
                        &#8216;info@megasale.am&#8217;/* $mailerarraystuff[0] */,<br />
                        &#8221; . $user-&gt;getEmailAddress() . &#8221;, &#8216;Shnorhakalutyun grancman hamar<br />
                                            Grancumn aktivacnelu hamar ayceleq hetvevyal hasceov: &#8216;<br />
                        . $activationUrl . &#8216; //Megasale&#8217;);<br />
        $message-&gt;setBcc($singleUserMail[0]['email_address']);<br />
        //$this-&gt;getMailer()-&gt;send($message);<br />
    }</p>
<p>    public function executeActivation(sfWebRequest $request) {<br />
        if ($request-&gt;isMethod(&#8216;get&#8217;)) {<br />
            $this-&gt;memberId = $request-&gt;getParameter(&#8216;member&#8217;);<br />
            $this-&gt;activationId = $request-&gt;getParameter(&#8216;activation&#8217;);</p>
<p>            $q2s = Doctrine_Query::create()-&gt;select(&#8216;p.id &#8216;)<br />
                            -&gt;from(&#8216;sfGuardUserProfile p&#8217;)<br />
                            -&gt;where(&#8216;p.token = ?&#8217;, $this-&gt;activationId );</p>
<p>            $getUserId = $q2s-&gt;fetchArray();<br />
            $this-&gt;activated = 0;<br />
            if (sizeof($getUserId[0][id])) {</p>
<p>            Doctrine_Query::create ()<br />
                        -&gt;update(&#8216;sfGuardUser u&#8217;)<br />
                        -&gt;set(&#8216;u.is_active&#8217;, 1)<br />
                        -&gt;where(&#8216;u.id = ?&#8217;, $getUserId[0][id])-&gt;execute();<br />
            $this-&gt;activated = 1;<br />
            }<br />
        }</p>
<p>    }<br />
    public function executeActivationgo(sfWebRequest $request) {</p>
<p>    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: etoileweb</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/comment-page-1/#comment-3733</link>
		<dc:creator>etoileweb</dc:creator>
		<pubDate>Thu, 21 Oct 2010 08:38:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434#comment-3733</guid>
		<description>Euh, excuse, do I need to create a Profile module based on the sf_guard_user_profile table ? In which module is the executeRegister() action located ? Thks</description>
		<content:encoded><![CDATA[<p>Euh, excuse, do I need to create a Profile module based on the sf_guard_user_profile table ? In which module is the executeRegister() action located ? Thks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlos</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/comment-page-1/#comment-3692</link>
		<dc:creator>carlos</dc:creator>
		<pubDate>Fri, 01 Oct 2010 23:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434#comment-3692</guid>
		<description>Thanks, just what I needed.  I disabled the token and I auto login the user, to do that  you just need to add this in executeRegister():
              $this-&gt;getUser()-&gt;signIn($this-&gt;form-&gt;getObject());

before the forward obviously and comment all the token code:

              // deactivate the account, till the user verifies the account
              //$user-&gt;setIsActive(false);

              // set the activation token
              //$profile = $user-&gt;getProfile();
              //$profile-&gt;setToken(md5(time()));

              // notify the user about the signup
              //$this-&gt;notifySignup($user, $profile);</description>
		<content:encoded><![CDATA[<p>Thanks, just what I needed.  I disabled the token and I auto login the user, to do that  you just need to add this in executeRegister():<br />
              $this-&gt;getUser()-&gt;signIn($this-&gt;form-&gt;getObject());</p>
<p>before the forward obviously and comment all the token code:</p>
<p>              // deactivate the account, till the user verifies the account<br />
              //$user-&gt;setIsActive(false);</p>
<p>              // set the activation token<br />
              //$profile = $user-&gt;getProfile();<br />
              //$profile-&gt;setToken(md5(time()));</p>
<p>              // notify the user about the signup<br />
              //$this-&gt;notifySignup($user, $profile);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jd</title>
		<link>http://blog.rajatpandit.com/2009/12/30/sfdoctrineguardplugin-signup-validation-and-profile/comment-page-1/#comment-2793</link>
		<dc:creator>jd</dc:creator>
		<pubDate>Wed, 28 Apr 2010 01:10:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=434#comment-2793</guid>
		<description>Hope one day someone will extend this great how to with implementations of the notifySignup() method and executeActivate() action :-)

Do you think the activate action should take username and the md5 as the links parameter or just the md5?

i.e. server/user/jd/code/

or

server/code/</description>
		<content:encoded><![CDATA[<p>Hope one day someone will extend this great how to with implementations of the notifySignup() method and executeActivate() action <img src='http://blog.rajatpandit.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Do you think the activate action should take username and the md5 as the links parameter or just the md5?</p>
<p>i.e. server/user/jd/code/</p>
<p>or</p>
<p>server/code/</p>
]]></content:encoded>
	</item>
</channel>
</rss>

