<?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: LDAP with full CRUD, a living example!</title>
	<atom:link href="http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/</link>
	<description>If I have seen a little further it is by standing on the shoulders of Giants. - Newton</description>
	<lastBuildDate>Sat, 28 Jan 2012 23:17:34 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: analogrithems</title>
		<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/#comment-1405</link>
		<dc:creator>analogrithems</dc:creator>
		<pubDate>Thu, 15 Sep 2011 10:58:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=13#comment-1405</guid>
		<description>I&#039;m not sure it will work with paginator.  I&#039;ve never tried that.  you should be able to get column sorting by setting options in  your model-&gt;find</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure it will work with paginator.  I&#8217;ve never tried that.  you should be able to get column sorting by setting options in  your model->find</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leandro</title>
		<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/#comment-1286</link>
		<dc:creator>Leandro</dc:creator>
		<pubDate>Mon, 22 Aug 2011 20:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=13#comment-1286</guid>
		<description>Hello, thank you very much for the code!

Im wondering if you could help because im having trouble using Paginator Helper.

I simply can&#039;t sort any column coming from the Ldap Model (people). For example if i click on  $this-&gt;Paginator-&gt;sort(&#039;givenname&#039;); nothing happens. Other columns, based on Mysql Models works fine.

Any fix or tip?</description>
		<content:encoded><![CDATA[<p>Hello, thank you very much for the code!</p>
<p>Im wondering if you could help because im having trouble using Paginator Helper.</p>
<p>I simply can&#8217;t sort any column coming from the Ldap Model (people). For example if i click on  $this-&gt;Paginator-&gt;sort(&#8216;givenname&#8217;); nothing happens. Other columns, based on Mysql Models works fine.</p>
<p>Any fix or tip?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mario Dourado</title>
		<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/#comment-1078</link>
		<dc:creator>Mario Dourado</dc:creator>
		<pubDate>Wed, 17 Nov 2010 19:35:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=13#comment-1078</guid>
		<description>Thanx for the code.</description>
		<content:encoded><![CDATA[<p>Thanx for the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: analogrithems</title>
		<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/#comment-1077</link>
		<dc:creator>analogrithems</dc:creator>
		<pubDate>Sun, 07 Nov 2010 07:20:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=13#comment-1077</guid>
		<description>thanks, I didn&#039;t have a openldap server to test against, I&#039;ll get this updated</description>
		<content:encoded><![CDATA[<p>thanks, I didn&#8217;t have a openldap server to test against, I&#8217;ll get this updated</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: analogrithems</title>
		<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/#comment-1076</link>
		<dc:creator>analogrithems</dc:creator>
		<pubDate>Sun, 07 Nov 2010 07:18:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=13#comment-1076</guid>
		<description>You should use $this-&gt;log(print_r($var,true),&#039;debug&#039;); statements all over your coder and this model datasource to track things down.</description>
		<content:encoded><![CDATA[<p>You should use $this->log(print_r($var,true),&#8217;debug&#8217;); statements all over your coder and this model datasource to track things down.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: analogrithems</title>
		<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/#comment-1075</link>
		<dc:creator>analogrithems</dc:creator>
		<pubDate>Sun, 07 Nov 2010 07:17:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=13#comment-1075</guid>
		<description>Try this condition 
$condition =  array(&#039;and&#039; =&gt; array(&#039;equals&#039; =&gt; array( &#039;cn&#039;=&gt; &#039;aaronc&#039;, &#039;equals&#039;=&gt;array(&#039;objectclass&#039; =&gt; &#039;person&#039;))));

filters in ldap are a tricky thing, I should update the docs for this to explain this logic.  If you think about this, it makes sense.  You have to use the equals operator, because it needs to support fuzzy matches.</description>
		<content:encoded><![CDATA[<p>Try this condition<br />
$condition =  array(&#8216;and&#8217; =&gt; array(&#8216;equals&#8217; =&gt; array( &#8216;cn&#8217;=&gt; &#8216;aaronc&#8217;, &#8216;equals&#8217;=&gt;array(&#8216;objectclass&#8217; =&gt; &#8216;person&#8217;))));</p>
<p>filters in ldap are a tricky thing, I should update the docs for this to explain this logic.  If you think about this, it makes sense.  You have to use the equals operator, because it needs to support fuzzy matches.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Invis</title>
		<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/#comment-1073</link>
		<dc:creator>Invis</dc:creator>
		<pubDate>Tue, 19 Oct 2010 21:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=13#comment-1073</guid>
		<description>Hey!  Thanks for putting together this and the LdapAuth component -- they work great!

I&#039;ve run into a problem getting complex conditions to work -- it seems that it passes the conditions array to the ldap_search call, which doesn&#039;t work.  Here&#039;s an example of the find I&#039;m running:

find(&#039;all&#039;, array(&#039;conditions&#039; =&gt; array(&#039;and&#039; =&gt; array(&#039;cn&#039; =&gt; $searchCn, &#039;objectclass&#039; =&gt; &#039;person&#039;)), &#039;fields&#039; =&gt; array(&#039;displayname&#039;), &#039;limit&#039; =&gt; 10));

Is there another way to do this, syntax-wise?  The filter string that needs to be generated for the actual query looks something like:

&#039;(&amp;(cn=foo*)(objectclass=person))&#039;

Thanks much for the add-ons and any help!</description>
		<content:encoded><![CDATA[<p>Hey!  Thanks for putting together this and the LdapAuth component &#8212; they work great!</p>
<p>I&#8217;ve run into a problem getting complex conditions to work &#8212; it seems that it passes the conditions array to the ldap_search call, which doesn&#8217;t work.  Here&#8217;s an example of the find I&#8217;m running:</p>
<p>find(&#8216;all&#8217;, array(&#8216;conditions&#8217; =&gt; array(&#8216;and&#8217; =&gt; array(&#8216;cn&#8217; =&gt; $searchCn, &#8216;objectclass&#8217; =&gt; &#8216;person&#8217;)), &#8216;fields&#8217; =&gt; array(&#8216;displayname&#8217;), &#8216;limit&#8217; =&gt; 10));</p>
<p>Is there another way to do this, syntax-wise?  The filter string that needs to be generated for the actual query looks something like:</p>
<p>&#8216;(&amp;(cn=foo*)(objectclass=person))&#8217;</p>
<p>Thanks much for the add-ons and any help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: orangepeelbeef</title>
		<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/#comment-1072</link>
		<dc:creator>orangepeelbeef</dc:creator>
		<pubDate>Mon, 27 Sep 2010 20:38:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=13#comment-1072</guid>
		<description>For some reason when i move the application from my development server and onto my prod server I get LDAP &#039;Operations Error&#039;  with no additional information in the logs,  is there any way to increase debugging?</description>
		<content:encoded><![CDATA[<p>For some reason when i move the application from my development server and onto my prod server I get LDAP &#8216;Operations Error&#8217;  with no additional information in the logs,  is there any way to increase debugging?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruben</title>
		<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/#comment-1071</link>
		<dc:creator>Ruben</dc:creator>
		<pubDate>Wed, 22 Sep 2010 17:04:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=13#comment-1071</guid>
		<description>I&#039;m still having these 3 errors in my view.:

Notice (8): Undefined offset: 0 [APP/models/datasources/ldap_source.php, line 626]
Notice (8): Undefined index: attributetypes [APP/models/datasources/ldap_source.php, line 1250]
Warning (2): ksort() expects parameter 1 to be array, null given [APP/models/datasources/ldap_source.php, line 1251]

Code for user_controller.php

class UsersController extends AppController {

	var $name = &#039;Users&#039;;

	function index() {
		$data = $this-&gt;User-&gt;find(&#039;all&#039;, array (
			&#039;conditions&#039; =&gt; array (
				&#039;uid&#039; =&gt; &#039;*&#039;,
			),
			&#039;fields&#039; =&gt; array (
				&#039;uid&#039;,
				&#039;givenname&#039;,
				&#039;sn&#039;
			)
		));
		$this-&gt;set(compact(&#039;data&#039;));
	}
}

code for user.php 

class User extends AppModel {
	var $useDbConfig = &#039;ldap_default&#039;;
	var $primaryKey = &#039;cn&#039;;
	var $defaultObjectClass = &#039;inetOrgPerson&#039;;
	var $name = &#039;User&#039;;
	var $useTable = &#039;ou=users&#039;;
}

code for database.php

var $ldap_default = array(
		&#039;datasource&#039; =&gt; &#039;ldap&#039;,
		&#039;host&#039; =&gt; array(&#039;localhost&#039;),
		&#039;port&#039; =&gt; 389,
		&#039;basedn&#039; =&gt; &#039;o=org,dc=test&#039;,
		&#039;login&#039; =&gt;  &#039;cn=root,dc=test&#039;,
		&#039;password&#039; =&gt; &#039;someText&#039;,
		&#039;database&#039; =&gt; &#039;&#039;,
		&#039;type&#039; =&gt; &#039;OpenLDAP&#039;,
		&#039;tls&#039; =&gt; false,
		&#039;version&#039; =&gt; 3
	);

I have to mention that the users are retrived from the LDAP server.</description>
		<content:encoded><![CDATA[<p>I&#8217;m still having these 3 errors in my view.:</p>
<p>Notice (8): Undefined offset: 0 [APP/models/datasources/ldap_source.php, line 626]<br />
Notice (8): Undefined index: attributetypes [APP/models/datasources/ldap_source.php, line 1250]<br />
Warning (2): ksort() expects parameter 1 to be array, null given [APP/models/datasources/ldap_source.php, line 1251]</p>
<p>Code for user_controller.php</p>
<p>class UsersController extends AppController {</p>
<p>	var $name = &#8216;Users&#8217;;</p>
<p>	function index() {<br />
		$data = $this-&gt;User-&gt;find(&#8216;all&#8217;, array (<br />
			&#8216;conditions&#8217; =&gt; array (<br />
				&#8216;uid&#8217; =&gt; &#8216;*&#8217;,<br />
			),<br />
			&#8216;fields&#8217; =&gt; array (<br />
				&#8216;uid&#8217;,<br />
				&#8216;givenname&#8217;,<br />
				&#8216;sn&#8217;<br />
			)<br />
		));<br />
		$this-&gt;set(compact(&#8216;data&#8217;));<br />
	}<br />
}</p>
<p>code for user.php </p>
<p>class User extends AppModel {<br />
	var $useDbConfig = &#8216;ldap_default&#8217;;<br />
	var $primaryKey = &#8216;cn&#8217;;<br />
	var $defaultObjectClass = &#8216;inetOrgPerson&#8217;;<br />
	var $name = &#8216;User&#8217;;<br />
	var $useTable = &#8216;ou=users&#8217;;<br />
}</p>
<p>code for database.php</p>
<p>var $ldap_default = array(<br />
		&#8216;datasource&#8217; =&gt; &#8216;ldap&#8217;,<br />
		&#8216;host&#8217; =&gt; array(&#8216;localhost&#8217;),<br />
		&#8216;port&#8217; =&gt; 389,<br />
		&#8216;basedn&#8217; =&gt; &#8216;o=org,dc=test&#8217;,<br />
		&#8216;login&#8217; =&gt;  &#8216;cn=root,dc=test&#8217;,<br />
		&#8216;password&#8217; =&gt; &#8216;someText&#8217;,<br />
		&#8216;database&#8217; =&gt; &#8221;,<br />
		&#8216;type&#8217; =&gt; &#8216;OpenLDAP&#8217;,<br />
		&#8216;tls&#8217; =&gt; false,<br />
		&#8216;version&#8217; =&gt; 3<br />
	);</p>
<p>I have to mention that the users are retrived from the LDAP server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralph Rößner</title>
		<link>http://www.analogrithems.com/rant/2009/06/12/cakephp-with-full-crud-a-living-example/#comment-1069</link>
		<dc:creator>Ralph Rößner</dc:creator>
		<pubDate>Mon, 16 Aug 2010 15:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=13#comment-1069</guid>
		<description>The setup code for talking to OpenLDAP servers appears to be missing a value for SchemaFilter. Consequently the datasource constructs a broken (bad filter) LDAP query and is unable to read any schema information from OpenLDAP. Setting SchemaFilter fixes that, like this:

--- ldap_source.php.orig	2010-08-11 18:05:37.000000000 +0200
+++ ldap_source.php	2010-08-11 18:05:42.000000000 +0200
@@ -1293,6 +1293,7 @@
 	}
 
 	function setOpenLDAPEnv(){
+		$this-&gt;SchemaFilter = &#039;(objectClass=subschema)&#039;;
                 $this-&gt;OperationalAttributes = &#039; + &#039;;
 	}</description>
		<content:encoded><![CDATA[<p>The setup code for talking to OpenLDAP servers appears to be missing a value for SchemaFilter. Consequently the datasource constructs a broken (bad filter) LDAP query and is unable to read any schema information from OpenLDAP. Setting SchemaFilter fixes that, like this:</p>
<p>&#8212; ldap_source.php.orig	2010-08-11 18:05:37.000000000 +0200<br />
+++ ldap_source.php	2010-08-11 18:05:42.000000000 +0200<br />
@@ -1293,6 +1293,7 @@<br />
 	}</p>
<p> 	function setOpenLDAPEnv(){<br />
+		$this-&gt;SchemaFilter = &#8216;(objectClass=subschema)&#8217;;<br />
                 $this-&gt;OperationalAttributes = &#8216; + &#8216;;<br />
 	}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic

Served from: www.analogrithems.com @ 2012-02-05 02:29:32 -->
