<?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>edsysad.org &#187; hack</title>
	<atom:link href="http://edsysad.org/tag/hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://edsysad.org</link>
	<description>another ed blogger....</description>
	<lastBuildDate>Fri, 27 Aug 2010 16:13:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Elgg LDAP Problem Solved&#8230;</title>
		<link>http://edsysad.org/2008/03/04/elgg-ldap-problem-solved/</link>
		<comments>http://edsysad.org/2008/03/04/elgg-ldap-problem-solved/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 03:17:22 +0000</pubDate>
		<dc:creator>Andrew Chlup</dc:creator>
				<category><![CDATA[Elgg]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[ldap]]></category>

		<guid isPermaLink="false">http://edsysad.org/2008/03/04/elgg-ldap-problem-solved/</guid>
		<description><![CDATA[As I was experimenting with Elgg and LDAP, I realized that none of the users create via LDAP authentication would so up in browse until somebody added them as a friend. Of course adding somebody who doesn&#8217;t show up in the list is a bit difficult so it was sort of a deal breaker. It [...]]]></description>
			<content:encoded><![CDATA[<p>As I was experimenting with Elgg and LDAP, I realized that none of the users create via LDAP authentication would so up in browse until somebody added them as a friend. Of course adding somebody who doesn&#8217;t show up in the list is a bit difficult so it was sort of a deal breaker.</p>
<p>It turns out that the friends able is used someway in the browse feature and users that register themselves are automatically made friends with a &#8220;0&#8243; user that doesn&#8217;t really exist. So basically, you have to add a little code to the <em>/auth/LDAP/lib.php  </em>and then your LDAP created users will work wonderfully.</p>
<p>Basically, I slightly modified a post that I found on the <a href="http://elgg.org/mod/vanillaforum/vanilla/comments.php?DiscussionID=619" title="Elgg Forums">Elgg forums</a>.</p>
<p>1. Find line 153:</p>
<blockquote><p>$user_id = insert_record(&#8216;users&#8217;,$user);</p></blockquote>
<p>2. Add the following below:</p>
<blockquote><p>    // adds &#8220;virtual&#8221; friend, so that user has at least one connection, and shows up in the browse feature.<br />
$newid = user_info_username(&#8216;ident&#8217;, $username);<br />
$owner = 0;<br />
$f = new StdClass;<br />
$f-&gt;owner = $owner;<br />
$f-&gt;friend = $newid;<br />
$f-&gt;status = &#8216;perm&#8217;;</p>
<p>insert_record(&#8216;friends&#8217;,$f);</p></blockquote>
<p>The additionally code simple grabs the new users &#8220;ident&#8221; from the User table and inserts a friend record with the shadowy &#8220;0&#8243; user.</p>
<p>Now, if I can just figure out how to setup the tag cloud to work correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://edsysad.org/2008/03/04/elgg-ldap-problem-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
