<?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: User Registration with CakePHP 1.2 and Auth Component</title>
	<atom:link href="http://www.jonnyreeves.co.uk/2008/05/user-registration-with-cakephp-12-and-auth-component/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jonnyreeves.co.uk/2008/05/user-registration-with-cakephp-12-and-auth-component/</link>
	<description>Actionscript, Flash, PHP and stuff</description>
	<lastBuildDate>Sun, 04 Jul 2010 15:32:43 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bryan</title>
		<link>http://www.jonnyreeves.co.uk/2008/05/user-registration-with-cakephp-12-and-auth-component/comment-page-1/#comment-4768</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Thu, 11 Jun 2009 01:11:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonnyreeves.co.uk/?p=33#comment-4768</guid>
		<description>Hey all - well I posted this problem to another blog but see that this one is more recent. I am in need of help - I&#039;m struggling with having the authComponent use email instead of username for login. Cake Version 1.2

This is what I have in app_controller:
var $components = array(’Auth’);

function beforeFilter() {
$this-&gt;Auth-&gt;fields = array(
‘username’ =&gt; ‘email’,
‘password’ =&gt; ‘password’
);
}

This is what I have in login.ctp:
echo $form-&gt;create(’User’, array(’action’ =&gt; ‘login’));
echo $form-&gt;input(’email’);
echo $form-&gt;input(’password’);
echo $form-&gt;end(’Login’);

I have verified that the registration is working – db is storing users perfectly w/ hashed password. Even after changing the fields in the app_controller before filter, I am getting “Login failed. Invalid username or password.” as the auth flash message.

Any help would be appreciated!</description>
		<content:encoded><![CDATA[<p>Hey all &#8211; well I posted this problem to another blog but see that this one is more recent. I am in need of help &#8211; I&#8217;m struggling with having the authComponent use email instead of username for login. Cake Version 1.2</p>
<p>This is what I have in app_controller:<br />
var $components = array(’Auth’);</p>
<p>function beforeFilter() {<br />
$this-&gt;Auth-&gt;fields = array(<br />
‘username’ =&gt; ‘email’,<br />
‘password’ =&gt; ‘password’<br />
);<br />
}</p>
<p>This is what I have in login.ctp:<br />
echo $form-&gt;create(’User’, array(’action’ =&gt; ‘login’));<br />
echo $form-&gt;input(’email’);<br />
echo $form-&gt;input(’password’);<br />
echo $form-&gt;end(’Login’);</p>
<p>I have verified that the registration is working – db is storing users perfectly w/ hashed password. Even after changing the fields in the app_controller before filter, I am getting “Login failed. Invalid username or password.” as the auth flash message.</p>
<p>Any help would be appreciated!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mzee.richo</title>
		<link>http://www.jonnyreeves.co.uk/2008/05/user-registration-with-cakephp-12-and-auth-component/comment-page-1/#comment-1535</link>
		<dc:creator>mzee.richo</dc:creator>
		<pubDate>Thu, 09 Oct 2008 10:29:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonnyreeves.co.uk/?p=33#comment-1535</guid>
		<description>Nice stuff . trully cool .</description>
		<content:encoded><![CDATA[<p>Nice stuff . trully cool .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dan</title>
		<link>http://www.jonnyreeves.co.uk/2008/05/user-registration-with-cakephp-12-and-auth-component/comment-page-1/#comment-1409</link>
		<dc:creator>dan</dc:creator>
		<pubDate>Sun, 07 Sep 2008 20:38:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonnyreeves.co.uk/?p=33#comment-1409</guid>
		<description>where does this go?
Auth-&gt;allow(‘register’);</description>
		<content:encoded><![CDATA[<p>where does this go?<br />
Auth-&gt;allow(‘register’);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vikram</title>
		<link>http://www.jonnyreeves.co.uk/2008/05/user-registration-with-cakephp-12-and-auth-component/comment-page-1/#comment-769</link>
		<dc:creator>Vikram</dc:creator>
		<pubDate>Thu, 26 Jun 2008 06:08:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonnyreeves.co.uk/?p=33#comment-769</guid>
		<description>Great writeup! However, if $this-&gt;data[‘User’][‘passwrd’] = null; before the User is saved, the validation on passwrd will always fail. The ideal location would be after the if ($this-&gt;User-&gt;save()) { ... } block. Resetting is not really necessary prior to the redirect, but is not a bad idea.</description>
		<content:encoded><![CDATA[<p>Great writeup! However, if $this-&gt;data[‘User’][‘passwrd’] = null; before the User is saved, the validation on passwrd will always fail. The ideal location would be after the if ($this-&gt;User-&gt;save()) { &#8230; } block. Resetting is not really necessary prior to the redirect, but is not a bad idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ben</title>
		<link>http://www.jonnyreeves.co.uk/2008/05/user-registration-with-cakephp-12-and-auth-component/comment-page-1/#comment-744</link>
		<dc:creator>ben</dc:creator>
		<pubDate>Wed, 18 Jun 2008 20:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonnyreeves.co.uk/?p=33#comment-744</guid>
		<description>It&#039;s probably better to unset the passwrd field before you save it anyway, so that way it doesn&#039;t get saved to the model, if you have a field in the db for it, and it doesn&#039;t get printed on form invalidation.</description>
		<content:encoded><![CDATA[<p>It&#8217;s probably better to unset the passwrd field before you save it anyway, so that way it doesn&#8217;t get saved to the model, if you have a field in the db for it, and it doesn&#8217;t get printed on form invalidation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: casey</title>
		<link>http://www.jonnyreeves.co.uk/2008/05/user-registration-with-cakephp-12-and-auth-component/comment-page-1/#comment-729</link>
		<dc:creator>casey</dc:creator>
		<pubDate>Mon, 16 Jun 2008 05:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.jonnyreeves.co.uk/?p=33#comment-729</guid>
		<description>im so glad someone wrote something about authentication in 1.2. theres not a whole lot using the new components and the old stuff is kinda hackish and not cake-like

thanks</description>
		<content:encoded><![CDATA[<p>im so glad someone wrote something about authentication in 1.2. theres not a whole lot using the new components and the old stuff is kinda hackish and not cake-like</p>
<p>thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
