<?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: A Better Login System</title>
	<atom:link href="http://net.tutsplus.com/tutorials/php/a-better-login-system/feed/" rel="self" type="application/rss+xml" />
	<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/</link>
	<description>Web Development &#38; Design Tutorials</description>
	<lastBuildDate>Sun, 21 Mar 2010 05:19:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: George W</title>
		<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/comment-page-2/#comment-233651</link>
		<dc:creator>George W</dc:creator>
		<pubDate>Wed, 17 Mar 2010 02:07:29 +0000</pubDate>
		<guid isPermaLink="false">http://net.tutsplus.com/?p=3461#comment-233651</guid>
		<description>I am working to build a website for my car club.  I want to have 3 or 4 user levels and this code will do a great job in that area.  I am very inexperienced in website building.  I don&#039;t see how to implement this into my site.  Do I need to have a good login script and then overlay this code over that code?  Any help you could suggest would be appreciated.  I am looking at a login code form easykiss123.com here is the link to the site
http://www.easykiss123.com/easy-setup-of-login-registration-and-password-protected-areas-on-your-website/
Thank you for your assistance.  I have downloaded your code and have uploaded it to try it out.  Looks great I just haven&#039;t figured out how to make it work on my site.
Thanks, George W</description>
		<content:encoded><![CDATA[<p>I am working to build a website for my car club.  I want to have 3 or 4 user levels and this code will do a great job in that area.  I am very inexperienced in website building.  I don&#8217;t see how to implement this into my site.  Do I need to have a good login script and then overlay this code over that code?  Any help you could suggest would be appreciated.  I am looking at a login code form easykiss123.com here is the link to the site<br />
<a href="http://www.easykiss123.com/easy-setup-of-login-registration-and-password-protected-areas-on-your-website/" rel="nofollow">http://www.easykiss123.com/easy-setup-of-login-registration-and-password-protected-areas-on-your-website/</a><br />
Thank you for your assistance.  I have downloaded your code and have uploaded it to try it out.  Looks great I just haven&#8217;t figured out how to make it work on my site.<br />
Thanks, George W</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/comment-page-3/#comment-222218</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 05 Mar 2010 11:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://net.tutsplus.com/?p=3461#comment-222218</guid>
		<description>Following up my previous post, I&#039;ve concluded that it would actually be more sensible for an explicit &#039;deny&#039; permission in any role to overrule an &#039;allow&#039; permission in any other. To do this with the existing code is very easy; in the function getRolePerms() change the first few lines to:

if (is_array($role))  
{  
        $roleSQL = &quot;SELECT * FROM `role_perms` WHERE `roleID` IN (&quot; . implode(&quot;,&quot;,$role) . &quot;) ORDER BY `value` DESC&quot;;  
} else {  
    $roleSQL = &quot;SELECT * FROM `role_perms` WHERE `roleID` = &quot; . floatval($role) . &quot; ORDER BY `value` DESC&quot;;  
}  

What I&#039;m doing here is simply ordering the role permissions by &#039;allowed&#039; permissions &gt; &#039;denied&#039; permissions. The array_merge function will then favour the &#039;deny&#039; permissions over the &#039;allow&#039; permissions with the same key.

If you want the opposite behaviour (an &#039;allow&#039; permission in any role overrides a &#039;deny&#039; permission) then change the DESC to ASC.</description>
		<content:encoded><![CDATA[<p>Following up my previous post, I&#8217;ve concluded that it would actually be more sensible for an explicit &#8216;deny&#8217; permission in any role to overrule an &#8216;allow&#8217; permission in any other. To do this with the existing code is very easy; in the function getRolePerms() change the first few lines to:</p>
<p>if (is_array($role))<br />
{<br />
        $roleSQL = &#8220;SELECT * FROM `role_perms` WHERE `roleID` IN (&#8221; . implode(&#8220;,&#8221;,$role) . &#8220;) ORDER BY `value` DESC&#8221;;<br />
} else {<br />
    $roleSQL = &#8220;SELECT * FROM `role_perms` WHERE `roleID` = &#8221; . floatval($role) . &#8221; ORDER BY `value` DESC&#8221;;<br />
}  </p>
<p>What I&#8217;m doing here is simply ordering the role permissions by &#8216;allowed&#8217; permissions &gt; &#8216;denied&#8217; permissions. The array_merge function will then favour the &#8216;deny&#8217; permissions over the &#8216;allow&#8217; permissions with the same key.</p>
<p>If you want the opposite behaviour (an &#8216;allow&#8217; permission in any role overrides a &#8216;deny&#8217; permission) then change the DESC to ASC.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/comment-page-3/#comment-222192</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Fri, 05 Mar 2010 10:57:35 +0000</pubDate>
		<guid isPermaLink="false">http://net.tutsplus.com/?p=3461#comment-222192</guid>
		<description>Say two roles have the same permission; in the role 1 the permission is set to &#039;allow&#039;, in role 2 the permission is &#039;deny&#039;. Now both roles are assigned to a single user. Will the user be allowed or denied the permission? I think the answer depends on whether role 1 or role 2 was assigned the permission first, since getRolePerms() orders the found permissions based on the ID in role_perms.

And if it does, then that is surely a fundamental flaw in the design, since it depends on the roles being ordered manually by &#039;most permissions&#039; &gt; &#039;less permissions&#039; to work as expected. Or am I missing something?

I think the behaviour should be: when any role specifies that a permission is &#039;allowed&#039; then that should take precedence over any other role that specifies it is denied, regardless of the role order. So in practice getRolePerms() should only return permissions where value = 1 (i.e. allowed permissions). Or, you could get rid of the value field altogether since it is redundant.

The alternative would be to use some kind of inheritance for roles, for example a tree structure so that children inherit parent permissions.</description>
		<content:encoded><![CDATA[<p>Say two roles have the same permission; in the role 1 the permission is set to &#8216;allow&#8217;, in role 2 the permission is &#8216;deny&#8217;. Now both roles are assigned to a single user. Will the user be allowed or denied the permission? I think the answer depends on whether role 1 or role 2 was assigned the permission first, since getRolePerms() orders the found permissions based on the ID in role_perms.</p>
<p>And if it does, then that is surely a fundamental flaw in the design, since it depends on the roles being ordered manually by &#8216;most permissions&#8217; &gt; &#8216;less permissions&#8217; to work as expected. Or am I missing something?</p>
<p>I think the behaviour should be: when any role specifies that a permission is &#8216;allowed&#8217; then that should take precedence over any other role that specifies it is denied, regardless of the role order. So in practice getRolePerms() should only return permissions where value = 1 (i.e. allowed permissions). Or, you could get rid of the value field altogether since it is redundant.</p>
<p>The alternative would be to use some kind of inheritance for roles, for example a tree structure so that children inherit parent permissions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jhonka</title>
		<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/comment-page-3/#comment-221183</link>
		<dc:creator>Jhonka</dc:creator>
		<pubDate>Thu, 04 Mar 2010 07:47:37 +0000</pubDate>
		<guid isPermaLink="false">http://net.tutsplus.com/?p=3461#comment-221183</guid>
		<description>Opps dude,

where is the logout if i am not wrong :((</description>
		<content:encoded><![CDATA[<p>Opps dude,</p>
<p>where is the logout if i am not wrong <img src='http://net.tutsplus.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> (</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rizq</title>
		<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/comment-page-3/#comment-218939</link>
		<dc:creator>rizq</dc:creator>
		<pubDate>Mon, 01 Mar 2010 08:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://net.tutsplus.com/?p=3461#comment-218939</guid>
		<description>problems with error reporting level, but solved now ;)

eg; line 50 in perms.php 

if (isset($_GET[&#039;action&#039;]) == &#039;perm&#039;) {  //working</description>
		<content:encoded><![CDATA[<p>problems with error reporting level, but solved now <img src='http://net.tutsplus.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>eg; line 50 in perms.php </p>
<p>if (isset($_GET['action']) == &#8216;perm&#8217;) {  //working</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bearbear</title>
		<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/comment-page-3/#comment-193791</link>
		<dc:creator>bearbear</dc:creator>
		<pubDate>Sun, 07 Feb 2010 19:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://net.tutsplus.com/?p=3461#comment-193791</guid>
		<description>thanks for ur sharing~</description>
		<content:encoded><![CDATA[<p>thanks for ur sharing~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: divyaprakash</title>
		<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/comment-page-3/#comment-181547</link>
		<dc:creator>divyaprakash</dc:creator>
		<pubDate>Thu, 28 Jan 2010 09:20:30 +0000</pubDate>
		<guid isPermaLink="false">http://net.tutsplus.com/?p=3461#comment-181547</guid>
		<description>Really great tutorial. Submit ur website to my PR2 web directory http://www.selra.org</description>
		<content:encoded><![CDATA[<p>Really great tutorial. Submit ur website to my PR2 web directory <a href="http://www.selra.org" rel="nofollow">http://www.selra.org</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/comment-page-3/#comment-173577</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Fri, 22 Jan 2010 14:28:36 +0000</pubDate>
		<guid isPermaLink="false">http://net.tutsplus.com/?p=3461#comment-173577</guid>
		<description>Great Tutorial, Thanks</description>
		<content:encoded><![CDATA[<p>Great Tutorial, Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ajith</title>
		<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/comment-page-3/#comment-160106</link>
		<dc:creator>ajith</dc:creator>
		<pubDate>Tue, 12 Jan 2010 10:55:13 +0000</pubDate>
		<guid isPermaLink="false">http://net.tutsplus.com/?p=3461#comment-160106</guid>
		<description>Great Article</description>
		<content:encoded><![CDATA[<p>Great Article</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP Login system Tutorial &#124; Jagadishwor's Blog</title>
		<link>http://net.tutsplus.com/tutorials/php/a-better-login-system/comment-page-3/#comment-155814</link>
		<dc:creator>PHP Login system Tutorial &#124; Jagadishwor's Blog</dc:creator>
		<pubDate>Thu, 31 Dec 2009 08:07:51 +0000</pubDate>
		<guid isPermaLink="false">http://net.tutsplus.com/?p=3461#comment-155814</guid>
		<description>[...] 8. A Better Login System [...]</description>
		<content:encoded><![CDATA[<p>[...] 8. A Better Login System [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.090 seconds -->
