<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHP User-Group Philippines Inc. &#187; PHP Frameworks</title>
	<atom:link href="http://phpugph.com/blog/tag/php-frameworks/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpugph.com/blog</link>
	<description>Official Blog of the PHPUGPH</description>
	<lastBuildDate>Fri, 25 Mar 2011 19:13:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to use AuthComponent in Cakephp 1.2</title>
		<link>http://phpugph.com/blog/2008/06/17/how-i-use-authcomponent-in-cakephp-12/</link>
		<comments>http://phpugph.com/blog/2008/06/17/how-i-use-authcomponent-in-cakephp-12/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 13:01:21 +0000</pubDate>
		<dc:creator>phpcurious</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[cakephp]]></category>
		<category><![CDATA[cakephp 1.2]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Frameworks]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.phpugph.com/blog/?p=41</guid>
		<description><![CDATA[How do you use AuthComponent and AclComponent to authenticate users? On app_controller.php, put this code: &#60;?php class AppController extends Controller { var $components = array(&#8216;Acl&#8217;,'Auth&#8217;,'Cookie&#8217;,'Session&#8217;); function beforeFilter() { $this-&#62;Auth-&#62;loginAction = &#8216;/users/login&#8217;; $this-&#62;Auth-&#62;loginRedirect = &#8216;/questions/Various-Topics&#8217;; $this-&#62;Auth-&#62;authorize = &#8216;actions&#8217;; } ?&#62; and, on every controller, create a beforeFilter function and put this : function beforeFilter() { //var_dump($this-&#62;params); [...]]]></description>
			<content:encoded><![CDATA[<p>How do you use AuthComponent and AclComponent to authenticate users? On app_controller.php,<br />
put this code:</p>
<div style="#FFFFFF;">&lt;?php</p>
<p>class AppController extends Controller {</p>
<p>var $components = array(&#8216;Acl&#8217;,'Auth&#8217;,'Cookie&#8217;,'Session&#8217;);</p>
<p>function beforeFilter()  {</p>
<p>$this-&gt;Auth-&gt;loginAction = &#8216;/users/login&#8217;;<br />
$this-&gt;Auth-&gt;loginRedirect = &#8216;/questions/Various-Topics&#8217;;</p>
<p>$this-&gt;Auth-&gt;authorize = &#8216;actions&#8217;;</p>
<p>}</p>
<p>?&gt;</p>
</div>
<p>and, on every controller, create a beforeFilter function and put this :</p>
<div style="#FFFFFF;">function beforeFilter()  {<br />
//var_dump($this-&gt;params);<br />
this-&gt;Auth-&gt;allow(&#8216;action1&#8242;,&#8217;action2&#8242;);<br />
parent::beforeFilter();<br />
}</div>
<p><span style="line-through;">Note, however , since AuthComponent is authenticating users based on controller actions with Acl, you will have to build your own cake acl too.</span></p>
<p>PS. Thanks to ditchx and primerg for the help!</p>
]]></content:encoded>
			<wfw:commentRss>http://phpugph.com/blog/2008/06/17/how-i-use-authcomponent-in-cakephp-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

