<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://jirwin.net" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Justin Gallardo - </title>
 <link>http://jirwin.net</link>
 <description></description>
 <language>en</language>
<item>
 <title>Isfound.at Super Beta</title>
 <link>http://jirwin.net/node/20</link>
 <description>&lt;p&gt;Woo! After years of talking about it, I have finally implemented some functionality into the isfound.at idea.&lt;/p&gt;
&lt;p&gt;The whole plan is to allow users to easily create a easy to remember domain, and allow it to redirect to whatever urls they want. Using a simple form, users can create something like &lt;a href=&quot;http://justin.isfound.at&quot; title=&quot;http://justin.isfound.at&quot;&gt;http://justin.isfound.at&lt;/a&gt; (Justin Is Found At...get it? Clever, I know. ;-) ), and it will simply redirect to the url they specify. &lt;/p&gt;
&lt;p&gt;Currently there is a very very beta version of the site online. Check it out at &lt;a href=&quot;http://isfound.at&quot; title=&quot;http://isfound.at&quot;&gt;http://isfound.at&lt;/a&gt;! This is so beta, I didn&#039;t even include instructions on how to use it, but hopefully it is pretty straight forward. Release early, release often I suppose.&lt;/p&gt;
&lt;p&gt;Please, please, please if you find any bugs, let me know. Feel free to leave a comment, or give me an email. Or both!&lt;/p&gt;
&lt;p&gt;Expect some better versions to come out soon, with expanded functionality. &lt;/p&gt;
&lt;p&gt;Woo!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jirwin.net/node/20&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://jirwin.net/node/20#comments</comments>
 <category domain="http://jirwin.net/taxonomy/term/10">isfound.at</category>
 <category domain="http://jirwin.net/taxonomy/term/4">mirwin</category>
 <category domain="http://jirwin.net/taxonomy/term/9">openid</category>
 <pubDate>Mon, 04 Feb 2008 22:15:03 -0800</pubDate>
 <dc:creator>jirwin</dc:creator>
 <guid isPermaLink="false">20 at http://jirwin.net</guid>
</item>
<item>
 <title>New Server Action!</title>
 <link>http://jirwin.net/node/19</link>
 <description>&lt;p&gt;Well, things probably look a bit different around here. I try and remind myself that while change isn&#039;t always good, in this case it is great.&lt;/p&gt;
&lt;p&gt;Recently &lt;a href=&quot;http://mburns.isfound.at&quot;&gt;Mike Burns&lt;/a&gt; and I went in together on purchasing a new server to host all of our sites, along with some new projects that we have been working on(&lt;a href=&quot;http://www.wepaytogether.com&quot;&gt;WePay&lt;/a&gt; for example).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/justingallardo/2235962060/&quot; title=&quot;Mirwin Server by jirwin304, on Flickr&quot;&gt;&lt;img align=&quot;right&quot; src=&quot;http://farm3.static.flickr.com/2111/2235962060_ab6a559eda_m.jpg&quot; width=&quot;240&quot; height=&quot;180&quot; alt=&quot;Mirwin Server&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After a couple long days of work, we are finally up and running to full capacity. No longer will we have to use the free virtual hosts so kindly offered from friends(Thank you!), and no longer will we have to worry about unexpected downtime. What a glorious thought.&lt;/p&gt;
&lt;p&gt;I urge you to keep an eye on &lt;a href=&quot;http://www.mirwin.net&quot;&gt;Mirwin&lt;/a&gt; as we continue to work on the site, and look out for future updates about what the Mirwin guys are up to.&lt;/p&gt;
&lt;p&gt;Stay tuned for much more to come.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jirwin.net/node/19&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://jirwin.net/node/19#comments</comments>
 <category domain="http://jirwin.net/taxonomy/term/1">announcement</category>
 <category domain="http://jirwin.net/taxonomy/term/4">mirwin</category>
 <pubDate>Sat, 02 Feb 2008 21:14:02 -0800</pubDate>
 <dc:creator>jirwin</dc:creator>
 <guid isPermaLink="false">19 at http://jirwin.net</guid>
</item>
<item>
 <title>OSCON is Here!</title>
 <link>http://jirwin.net/node/12</link>
 <description>&lt;p&gt;Well, the time has come. I am now sitting in my hotel room, counting the minutes until it is time for me to give my first talk. &lt;/p&gt;
&lt;p&gt;I am very excited for the conference this week, as there are some very interesting topics being talked about. I am looking forward to a lot of the talks including the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code Like a Pythonista: Idiomatic Python&lt;/li&gt;
&lt;li&gt;Python 3000&lt;/li&gt;
&lt;li&gt;How to Herd Cats and Influence People&lt;/li&gt;
&lt;li&gt;Who Gets to Decide What Open Source Means?&lt;/li&gt;
&lt;li&gt;PHP: Bigger and Faster&lt;/li&gt;
&lt;li&gt;Hello? Is There a User in the House?&lt;/li&gt;
&lt;li&gt;GPLv3 for People Who Aren&#039;t Lawyers&lt;/li&gt;
&lt;li&gt;VIM for PHP Programmers&lt;/li&gt;
&lt;li&gt;Super-sizing YouTube&lt;/li&gt;
&lt;li&gt;When Interface Design Attacks!&lt;/li&gt;
&lt;li&gt;Next Generation Version Control Systems&lt;/li&gt;
&lt;li&gt;Writing Big Apps with Google Web Toolkit&lt;/li&gt;
&lt;li&gt;Subversion Worst Practices&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I really would like to attend the Django Master Class, but it is during the same time as my tutorial. If anyone going to that would be willing to take good notes, please let me know. Thanks a lot!&lt;/p&gt;
&lt;p&gt;Overall, I am very excited for the conference. On top of all of the smart people that will be around, all of the cool topics being talked about, and all of the great connections that can be made, I happen to be turning 21 on Thursday(7/26), so it will cap the entire week of with a lot of fun.&lt;/p&gt;
&lt;p&gt;Woo! Time to have some fun!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jirwin.net/node/12&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://jirwin.net/node/12#comments</comments>
 <category domain="http://jirwin.net/taxonomy/term/12">conferences</category>
 <category domain="http://jirwin.net/taxonomy/term/11">open source</category>
 <pubDate>Sun, 22 Jul 2007 15:59:32 -0700</pubDate>
 <dc:creator>jirwin</dc:creator>
 <guid isPermaLink="false">12 at http://jirwin.net</guid>
</item>
<item>
 <title>My New XO Came!</title>
 <link>http://jirwin.net/node/13</link>
 <description>&lt;p&gt;I want to keep this short, but first off, I just have to say woot! My new B3 XO(don&#039;t know what this is? Check out &lt;a href=&quot;http://www.laptop.org&quot; title=&quot;http://www.laptop.org&quot;&gt;http://www.laptop.org&lt;/a&gt;) came today, and it is beautiful. I thought I would take a little time and put up some pictures since I haven&#039;t seen any around quite yet. &lt;/p&gt;
&lt;p&gt;The first thing I noticed immediately that is different is the outside of the case. The previous plain, white &#039;XO&#039; character is now brightly colored! Check this out: &lt;/p&gt;
&lt;p&gt;After I opened it up and got it started, I noticed immediately how much faster it is. Startup time was a fraction of what it took before, and getting into X was much faster. All around *everything* is faster about the laptop. &lt;/p&gt;
&lt;p&gt;Being a developer of the &lt;a href=&quot;http://olpc-player.helixcommunity.org&quot;&gt;Watch &amp;amp; Listen&lt;/a&gt; activity, I had to see how our media player did on the new hardware. After loading up Watch &amp;amp; Listen, and getting some content on the machine, all I have to say is one word. Amazing. The new hardware enables us to play videos at a *much* higher bitrate than we could before,  and newer codecs that we couldn&#039;t even think about using before. Also, the new hardware fixed some X driver issues we were running into before. Look at this:&lt;/p&gt;
&lt;p&gt;I am very excited about what opportunities the new hardware brings the Watch &amp;amp; Listen team. &lt;/p&gt;
&lt;p&gt;I will try and get more photos up when I find a better camera. I happened to get lucky with these two.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jirwin.net/node/13&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://jirwin.net/node/13#comments</comments>
 <category domain="http://jirwin.net/taxonomy/term/13">olpc</category>
 <category domain="http://jirwin.net/taxonomy/term/11">open source</category>
 <category domain="http://jirwin.net/taxonomy/term/8">technology</category>
 <pubDate>Mon, 11 Jun 2007 16:02:26 -0700</pubDate>
 <dc:creator>jirwin</dc:creator>
 <guid isPermaLink="false">13 at http://jirwin.net</guid>
</item>
<item>
 <title>The OSL is Hiring!</title>
 <link>http://jirwin.net/node/14</link>
 <description>&lt;p&gt;I have been an employee here at the Open Source Lab for nearly a year now, and can easily say that they have supported me in all of my FOSS endeavors(e.g. OLPC, OpenID). The nurturing environment has been extremely helpful to students, including myself, providing a spring board into the &#039;real world&#039;, helping countless students land jobs with big names like Google, Novell, Mozilla, and IBM.&lt;/p&gt;
&lt;p&gt;While the Open Source Lab has been crucial in so many students professional lives, it has also helped some of the biggest open source projects(Linux Kernel, Gentoo, Debian, Drupal, Freenode, Mozilla, and OLPC to name a few) out there become what they are today.&lt;/p&gt;
&lt;p&gt;The OSL is hiring a new manager type person to realize the big picture of things, and help continue the excellence of the lab. If you are looking for a great place to work and want to help out the FOSS community please take a look at &lt;a href=&quot;http://jobs.oregonstate.edu/applicants/Central?quickFind=51171&quot;&gt;the job posting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jirwin.net/node/14&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://jirwin.net/node/14#comments</comments>
 <category domain="http://jirwin.net/taxonomy/term/14">osl</category>
 <category domain="http://jirwin.net/taxonomy/term/15">osu</category>
 <pubDate>Mon, 21 May 2007 15:51:47 -0700</pubDate>
 <dc:creator>jirwin</dc:creator>
 <guid isPermaLink="false">14 at http://jirwin.net</guid>
</item>
<item>
 <title>More OpenID and Drupal</title>
 <link>http://jirwin.net/node/15</link>
 <description>&lt;p&gt;Real quick, I have been hacking on the Drupal OpenID module some more. I have some new features committed and working due to multiple requests. The two major features I added are MyOpenID Affiliate support and allowing users to have multiple OpenIDs associated with their account. I still have a bit more testing to do on the latter, but currently it seems to be working great!&lt;/p&gt;
&lt;p&gt;Please feel free to pull the code down from git(&lt;a href=&quot;http://jirwin.net/git/openid.git&quot; title=&quot;http://jirwin.net/git/openid.git&quot;&gt;http://jirwin.net/git/openid.git&lt;/a&gt;), and try things out. If you just want to pull the latest package, feel free to grab it at &lt;a href=&quot;http://jirwin.net/git/index.php?p=DrupalOpenID.git&amp;amp;dl=targz&quot; title=&quot;http://jirwin.net/git/index.php?p=DrupalOpenID.git&amp;amp;dl=targz&quot;&gt;http://jirwin.net/git/index.php?p=DrupalOpenID.git&amp;amp;dl=targz&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;Update 1:&lt;br /&gt;
It would seem that I have i-names working correctly. If you have one, feel free to try logging in with =name, and let me know how it goes. If you already have an account, just try adding =name to your OpenID list under your account settings. Woot!&lt;/p&gt;
&lt;p&gt;Update 2:&lt;br /&gt;
As per request, there is now a checkbox in the module settings to skip the user registration part, and just set the username to the OpenID, and attempt to pull an email address from the persona. Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jirwin.net/node/15&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://jirwin.net/node/15#comments</comments>
 <category domain="http://jirwin.net/taxonomy/term/6">code</category>
 <category domain="http://jirwin.net/taxonomy/term/16">drupal</category>
 <category domain="http://jirwin.net/taxonomy/term/11">open source</category>
 <category domain="http://jirwin.net/taxonomy/term/9">openid</category>
 <pubDate>Tue, 13 Feb 2007 16:53:40 -0800</pubDate>
 <dc:creator>jirwin</dc:creator>
 <guid isPermaLink="false">15 at http://jirwin.net</guid>
</item>
<item>
 <title>Drupal 5 and OpenID v2.0</title>
 <link>http://jirwin.net/node/16</link>
 <description>&lt;p&gt;So, ever since I made a post about what I had done with the OpenID drupal module, I have been receiving great feedback on how I can make it better. Much of the feedback were actual feature requests for the next version of the module. The main request was to allow every user in the Drupal db to enter an OpenID, allowing all users to authenticate with it. One person told me that if I did this, they would eliminate the default login block all together(a great idea!).  The other big request was to pull default account information from the OpenID&#039;s persona.&lt;/p&gt;
&lt;p&gt;Naturally, I thought these were both great ideas. Being the OpenID geek I am, I would love to do anything to help spread the &#039;Identity 2.0&#039; love. I waited a couple nights to get my midterms out of the way, and then started to dive into the code. Man o man, I thought I had a good understanding on how Drupal modules worked before. At the end of a 12 hour stint(8pm to 8am), I came out on top with the latest rendition(minus a few bug fixes), which you can find at it&#039;s git &lt;a href=&quot;http://jirwin.net/git/index.php?p=DrupalOpenID.git&amp;amp;dl=targz&quot;&gt;repository&lt;/a&gt;. That link will actually always point to the latest version of the code, which at this point is probably the best idea.&lt;/p&gt;
&lt;p&gt;The first thing I decided to tackle was pulling the information from the persona. After talking with &lt;a href=&quot;http://staff.osuosl.org/~gchaix&quot;&gt;Greg&lt;/a&gt; during work one day, he had mentioned that he was working on this in his own module for Drupal 4.6. He pointed me towards his blog, where he actually had posted the code to pull information using sreg. This was perfect! After incorporating his little tidbits into the code, I was able to pull information from the persona perfectly. For Greg&#039;s module, he chose to pull the full name, and use that in the user&#039;s profile. I decided that I wanted to set a users username to their nickname stored in the persona, as oppose to their actual OpenID. This way it would feel more like the rest of the drupal site, and long URLs wouldn&#039;t break my theme. I took care of the username and email validation with the following:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;geshifilter-php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;user_validate_name&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$query&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;nickname&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; != &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; drupal_set_message&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;Username invalid.&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;error&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Location: &amp;quot;&lt;/span&gt; . url&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;openid/get_email&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;!valid_email_address&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$query&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;email&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; drupal_set_message&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;Email address invalid.&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;error&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Location: &amp;quot;&lt;/span&gt; . url&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;openid/get_email&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;user_load&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;name&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$query&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;nickname&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; drupal_set_message&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;Username exists. Please try again&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;error&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Location: &amp;quot;&lt;/span&gt; . url&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;openid/get_email&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;user_load&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;mail&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$query&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;email&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; drupal_set_message&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;This email account already exists. Please log in using your existing password and add in your OpenID URL through the My Account option.&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;error&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.php.net/header&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;header&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Location: &amp;quot;&lt;/span&gt; . url&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;openid/get_email&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
With this code I am essentially trying to load a user from the DB with the given username or email address. If I can, that mean it exists, and we shouldn&#039;t try to create a new one(for obvious reasons). I also pulled a little code from Greg&#039;s blog again here to validate usernames and email addresses to make sure they are syntactically correct(alpha-numeric, non-empty essentially).&lt;/p&gt;
&lt;p&gt;The next step was the biggie, editing a user&#039;s profile to allow them to store an OpenID, allowing users to add/change their OpenID on a whim. I started hunting around on the Drupal 5 module API page, looking for a way to edit the user&#039;s profile. Unfortunately, I was unable to find any good documentation(examples) on how to do this. Eventually, I stumbled across some source somewhere that showed me how to do this. Personally, I thought this would be a more common use, but it seems that most modules just create new pages or nodes, as oppose to just using the &#039;My Account&#039; page. I was able to use the following to get it working for me:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;geshifilter-php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;switch&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$op&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;form&#039;&lt;/span&gt;:&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$category&lt;/span&gt; == &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;account&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; openid_user_form&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$edit&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;$user&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;$category&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;break&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
I put this start of the switch statement in the hook_user function. Also in this function, I am able to tell when the user updates their profile, deletes their account, or their account is being viewed. Using the switch appropriately, I am able to get every state that a user profile can be in. Perfect. The function that is being called in the above snippet looks like this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;geshifilter-php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; openid_user_form&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$edit&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;$user&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;$category&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000ff;&quot;&gt;$row&lt;/span&gt; = db_fetch_object&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;db_query&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;SELECT openid FROM {openid} WHERE uid = &#039;%d&#039;&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;$user&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;uid&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000ff;&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;openid&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;#type&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;fieldset&#039;&lt;/span&gt;,&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;#collapsible&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;FALSE&lt;/span&gt;,&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;#collapsed&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;FALSE&lt;/span&gt;,&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;#weight&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;,&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000ff;&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;openid&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;openid&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; = &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;#type&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;textfield&#039;&lt;/span&gt;,&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;#title&#039;&lt;/span&gt; =&amp;gt; t&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;OpenID&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;#maxlength&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;64&lt;/span&gt;,&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;#default_value&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$row&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;openid&lt;/span&gt;,&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;#description&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;If you have one, enter your OpenID here.&#039;&lt;/span&gt;,&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$form&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
All this does is create the new form item on profile page, and assign the different values. The fieldset type in the first item gives the text field its own little section on the page, and fits in well with the theme. &lt;/p&gt;
&lt;p&gt;After getting all of the interface parts to work, I then had to start work on how to save user OpenIDs. My original thoughts(it being 6am by this time), were to just add a field to the existing user table in the database. This is an obvious bad choice, and quickly corrected myself as I was eating a refreshing piece of fruit. I decided that it would be best to just create a new table, with a key relating back to the user id. I was easily able to do this with a install script that Drupal will invoke when the module is installed(uninstall things go here as well). This was nice and simple, and looked like this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;geshifilter-php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$query1&lt;/span&gt; = db_query&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;CREATE TABLE {openid} (&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; uid INT NOT NULL,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; openid VARCHAR( 64 ) NOT NULL,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRIMARY KEY (uid)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;With some simple SQL-fu on the hooks that I mentioned before, I was able to save, delete, and view the new field that I saved in the database. Woot! &lt;/p&gt;
&lt;p&gt;The last and final part that I needed to add, was instead of using an authorization map to log OpenID users in, I wanted to allow any user to login with the OpenID specified. The big difference with the OpenID method of logging in, is that a user may never specify a password to the drupal site if they use OpenID from the get go. I needed to figure out a way to allow manually log users in, if it was returned to me from the OpenID provider that they had authenticated. Apparently they thought about this, and had a great function for it. Perfect! It looked a little like this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;geshifilter&quot;&gt;&lt;div class=&quot;geshifilter-php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$row&lt;/span&gt; = db_fetch_object&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;db_query&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;SELECT * FROM {openid} WHERE openid = &#039;%s&#039;&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #0000ff;&quot;&gt;$openid_url&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$row&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;uid&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: monospace; font-weight: normal;&quot;&gt;&lt;div style=&quot;font-family: monospace; font-weight: normal; font-style: normal&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #0000ff;&quot;&gt;$user&lt;/span&gt; = user_load&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #000066;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;uid&#039;&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$row&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color: #006600;&quot;&gt;uid&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;This code trys and grab a user from the table that has the OpenID that just authenticated. If it finds it, it trys and loads/logs in the user. Voila! We now have a Drupal authentication module. Woot!&lt;/p&gt;
&lt;p&gt;Hopefully this module will help some other people out there. Above all, I really do hope that having a CMS as big as Drupal support OpenID now, it will help push the use of the protocol that much more. &lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;Update:&lt;br /&gt;
I just finished adding MyOpenID affiliate support. You will now see a link in the login block allowing users to create an OpenID through MyOpenID. If you go into the admin settings, you can now set an affiliate ID, which will automatically change the create an OpenID link in the login block to be your affiliate page. After users create an OpenID, it will automatically start and log them in to the Drupal site(which will invoke the drupal account creation page naturally). Enjoy!&lt;/p&gt;
&lt;p&gt;Update 2:&lt;br /&gt;
I just made the git archive public, so it will be a bit easier for others to update their code to my fixes and such. You can clone the archive from &lt;a href=&quot;http://jirwin.net/git/openid.git&quot; title=&quot;http://jirwin.net/git/openid.git&quot;&gt;http://jirwin.net/git/openid.git&lt;/a&gt;. Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jirwin.net/node/16&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://jirwin.net/node/16#comments</comments>
 <pubDate>Thu, 08 Feb 2007 16:57:30 -0800</pubDate>
 <dc:creator>jirwin</dc:creator>
 <guid isPermaLink="false">16 at http://jirwin.net</guid>
</item>
<item>
 <title>Drupal 5 and OpenID</title>
 <link>http://jirwin.net/node/17</link>
 <description>&lt;p&gt;A few days ago in CS 419, a fellow student gave a presentation on how to setup Drupal 5, and showed some of its cooler features. After seeing it used in action, I knew that I wanted to move to it, for the sole reason of being able to incorporate my photo gallery into the same theme as my blog. And as you may be able to tell, here it is.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://jirwin.net/node/17&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://jirwin.net/node/17#comments</comments>
 <category domain="http://jirwin.net/taxonomy/term/6">code</category>
 <category domain="http://jirwin.net/taxonomy/term/16">drupal</category>
 <category domain="http://jirwin.net/taxonomy/term/11">open source</category>
 <category domain="http://jirwin.net/taxonomy/term/9">openid</category>
 <pubDate>Fri, 26 Jan 2007 06:36:47 -0800</pubDate>
 <dc:creator>jirwin</dc:creator>
 <guid isPermaLink="false">17 at http://jirwin.net</guid>
</item>
<item>
 <title>LCA 2007: Day One</title>
 <link>http://jirwin.net/node/18</link>
 <description>&lt;p&gt;Well, it has been quite an adventure to get from good ole Corvallis to the beautiful Sydney. After 16 hours in a plane, we finally landed, and started our expedition in the &#039;down under&#039;.&lt;/p&gt;
&lt;p&gt;Right now, I am sitting here in the Gnome Mini-conference listening to &lt;a href=&quot;http://live.gnome.org/NigelTao&quot;&gt;Nigel Tao&lt;/a&gt; go through some of the lesser known interface features of Gnome. Fun times!&lt;/p&gt;
&lt;p&gt;Throughout the conference look for a lot of these little short posts as I don&#039;t have internet access in my hotel room, and I don&#039;t want to spend much time on the computer during talks.&lt;/p&gt;
</description>
 <comments>http://jirwin.net/node/18#comments</comments>
 <category domain="http://jirwin.net/taxonomy/term/12">conferences</category>
 <category domain="http://jirwin.net/taxonomy/term/2">linux</category>
 <category domain="http://jirwin.net/taxonomy/term/11">open source</category>
 <pubDate>Tue, 23 Jan 2007 17:07:46 -0800</pubDate>
 <dc:creator>jirwin</dc:creator>
 <guid isPermaLink="false">18 at http://jirwin.net</guid>
</item>
</channel>
</rss>
