<?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>Wed, 04 Apr 2012 03:46:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	
<div id="wdsb-share-box" style="border:2px solid;">
	<ul>
			<li>
						<div class="wdsb-item" id="wdsb-service-google">
				<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="tall"></g:plusone>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-facebook">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fedsysad.org%2F2010%2F10%2F01%2Fmoodle-ldap-and-email%2F&amp;send=false&amp;layout=box_count&amp;width=100&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=60" scrolling="no" frameborder="0" style="border:none; width:58px; height:62px;" allowTransparency="true"></iframe>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-twitter">
				<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-stumble_upon">
				<script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-reddit">
				<script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-linkedin">
				<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-counter="top"></script>			</div>
		</li>
			<li>
						<div class="wdsb-item" id="wdsb-service-pinterest">
							</div>
		</li>
		</ul>
</div>	<item>
		<title>Moodle LDAP and Email Hack</title>
		<link>http://edsysad.org/2010/10/01/moodle-ldap-and-email/</link>
		<comments>http://edsysad.org/2010/10/01/moodle-ldap-and-email/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 05:34:04 +0000</pubDate>
		<dc:creator>Andrew Chlup</dc:creator>
				<category><![CDATA[Moodle]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://edsysad.org/?p=237</guid>
		<description><![CDATA[So all of our teachers have their email address in LDAP, but some students did not. This causes all sorts of problems when the student logs in the first time. I realized that it would be easy enough to edit the file that creates new accounts to automatically insert an email address if the new [...]]]></description>
			<content:encoded><![CDATA[<p>So all of our teachers have their email address in LDAP, but some students did not. This causes all sorts of problems when the student logs in the first time.</p>
<p>I realized that it would be easy enough to edit the file that creates new accounts to automatically insert an email address if the new email field is blank.</p>
<p>1. Navigate to &lt;moodle_root&gt;/lib/moodlelib.php</p>
<p>2. Edit the file by adding the logic below:</p>
<pre style="padding-left: 30px;">/**Removed (not) from line below and commented out text to automatically create a valid email address**/
 if (empty($newuser-&gt;email)) {
 /*if (email_is_not_allowed($newuser-&gt;email)) {
 unset($newuser-&gt;email);
 }*/
 //This automatically creates email address based upon your domain.
 $newuser-&gt;email = $username . "@your.domain";
 }</pre>
<p>3. Now when users login and don&#8217;t have email, they are automatically assigned an email. This same trick can be used if your students don&#8217;t have true email accounts.</p>
<p>I can&#8217;t remember which line you begin editing but you can find it by searching for &#8220;if (!empty($newuser-&gt;email)) {&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://edsysad.org/2010/10/01/moodle-ldap-and-email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>

