<?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: CakePHP and RememberMe &#8212; AutoLogins for the soul</title>
	<atom:link href="http://blog.japanesetesting.com/2009/09/11/cakephp-and-rememberme-autologins-for-the-soul/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.japanesetesting.com/2009/09/11/cakephp-and-rememberme-autologins-for-the-soul/</link>
	<description>Design and Programming of a mISV Site</description>
	<lastBuildDate>Sat, 07 Jan 2012 06:25:47 +0900</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Gilmar</title>
		<link>http://blog.japanesetesting.com/2009/09/11/cakephp-and-rememberme-autologins-for-the-soul/comment-page-1/#comment-383</link>
		<dc:creator>Gilmar</dc:creator>
		<pubDate>Mon, 07 Nov 2011 23:46:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.japanesetesting.com/?p=48#comment-383</guid>
		<description>&lt;strong&gt;Gilmar...&lt;/strong&gt;

[...]CakePHP and RememberMe &#8212; AutoLogins for the soul &#187;  Adventures in Japanese Programming[...]...</description>
		<content:encoded><![CDATA[<p><strong>Gilmar&#8230;</strong></p>
<p>[...]CakePHP and RememberMe &#8212; AutoLogins for the soul &raquo;  Adventures in Japanese Programming[...]&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harisenbon</title>
		<link>http://blog.japanesetesting.com/2009/09/11/cakephp-and-rememberme-autologins-for-the-soul/comment-page-1/#comment-36</link>
		<dc:creator>Harisenbon</dc:creator>
		<pubDate>Sun, 04 Oct 2009 13:11:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.japanesetesting.com/?p=48#comment-36</guid>
		<description>Dr. Lecter ;)

No problem about the being busy! I definitely know the feeling!

I would like to put the _post_login() function in the model but I didn&#039;t for two reasons:

1)
I had a lot of cookie, auth-&gt;user and redirecting logic that I needed to take care of in addition to the regular data manipulation, so I couldn&#039;t take care of all of it in-model without passing a lot of references to controller-only functions. If I was dealing only with data logic, then I would have stuck it all in the model, but the cookies and Auth access is what stopped me.&lt;/li&gt;

2)
I wanted to show people how to forcibly add a controller. ;)

I&#039;m trying more and more to get the logic out of my controllers and into my models, but I find that a lack of access to cookies, session and Auth really hurt that.
I hate having to pass a ton of variables whenever I want to call a simple function. I find that it ends up taking more code to prepare and pass the data to the model than it would to use a built-in model function such as find() or save() and just create the query variables in-controller.

And every time I do it, I feel like a bad baker. ;)

Also, regarding the cookie, I was noticing that the supplied cookie name wasn&#039;t working, nor were my attempts to change the cookie name in the config file. The line I added was merely a cheap hack to solve a problem that I really couldn&#039;t figure out. :/</description>
		<content:encoded><![CDATA[<p>Dr. Lecter <img src='http://blog.japanesetesting.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>No problem about the being busy! I definitely know the feeling!</p>
<p>I would like to put the _post_login() function in the model but I didn&#8217;t for two reasons:</p>
<p>1)<br />
I had a lot of cookie, auth->user and redirecting logic that I needed to take care of in addition to the regular data manipulation, so I couldn&#8217;t take care of all of it in-model without passing a lot of references to controller-only functions. If I was dealing only with data logic, then I would have stuck it all in the model, but the cookies and Auth access is what stopped me.</p>
<p>2)<br />
I wanted to show people how to forcibly add a controller. <img src='http://blog.japanesetesting.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I&#8217;m trying more and more to get the logic out of my controllers and into my models, but I find that a lack of access to cookies, session and Auth really hurt that.<br />
I hate having to pass a ton of variables whenever I want to call a simple function. I find that it ends up taking more code to prepare and pass the data to the model than it would to use a built-in model function such as find() or save() and just create the query variables in-controller.</p>
<p>And every time I do it, I feel like a bad baker. <img src='http://blog.japanesetesting.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Also, regarding the cookie, I was noticing that the supplied cookie name wasn&#8217;t working, nor were my attempts to change the cookie name in the config file. The line I added was merely a cheap hack to solve a problem that I really couldn&#8217;t figure out. :/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dr. Hannibal Lecter</title>
		<link>http://blog.japanesetesting.com/2009/09/11/cakephp-and-rememberme-autologins-for-the-soul/comment-page-1/#comment-33</link>
		<dc:creator>dr. Hannibal Lecter</dc:creator>
		<pubDate>Sun, 04 Oct 2009 00:38:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.japanesetesting.com/?p=48#comment-33</guid>
		<description>Hi there!

Sorry for my *very* late reaction, I&#039;ve been slightly busy lately...

Now about your modifications; wouldn&#039;t it be better to move _post_login() function to your User model? I mean, if everything you do in it is actually handling data and doesn&#039;t really have anything to do with application logic, a model is a much more logical place, don&#039;t you agree?

Also, the line you added in the check() function [$this-&gt;Cookie-&gt;name = &#039;rememberme&#039;;] defeats the purpose of component&#039;s &quot;cookieName&quot; var, which should be used for customization. I don&#039;t think it should work either, I don&#039;t see it being used..?

What&#039;s your opinion?</description>
		<content:encoded><![CDATA[<p>Hi there!</p>
<p>Sorry for my *very* late reaction, I&#8217;ve been slightly busy lately&#8230;</p>
<p>Now about your modifications; wouldn&#8217;t it be better to move _post_login() function to your User model? I mean, if everything you do in it is actually handling data and doesn&#8217;t really have anything to do with application logic, a model is a much more logical place, don&#8217;t you agree?</p>
<p>Also, the line you added in the check() function [$this-&gt;Cookie-&gt;name = 'rememberme';] defeats the purpose of component&#8217;s &#8220;cookieName&#8221; var, which should be used for customization. I don&#8217;t think it should work either, I don&#8217;t see it being used..?</p>
<p>What&#8217;s your opinion?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

