<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -25,3 +25,7 @@ end
 N_COLUMNS = 4
 # The number of raster results per page.
 RASTER_PER_PAGE = 3 * N_COLUMNS
+
+# Demo user's id
+# The admin must create a demo user in demo mode with id = 2.
+DEMO_USER_ID = 2
\ No newline at end of file</diff>
      <filename>config/initializers/global_constants.rb</filename>
    </modified>
    <modified>
      <diff>@@ -65,7 +65,7 @@ module AuthenticatedSystem
         format.html do
           store_location
           if global_prefs.demo?
-            self.current_person = Person.find_by_name(&quot;Guest User&quot;)
+            self.current_person = Person.find(DEMO_USER_ID)
             flash[:success] = &quot;You have been logged in as the guest user.&quot;
             redirect_back_or_default(home_url)
           else</diff>
      <filename>lib/authenticated_system.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8ec714e1f1dc7c789f003e3a63c3ba3345ff54f7</id>
    </parent>
  </parents>
  <author>
    <name>Michael Hartl</name>
    <email>michael@michaelhartl.com</email>
  </author>
  <url>http://github.com/piotrj/insoshi/commit/6951b808325741c0d29675e9e41aff8a4cf65217</url>
  <id>6951b808325741c0d29675e9e41aff8a4cf65217</id>
  <committed-date>2008-06-11T11:48:24-07:00</committed-date>
  <authored-date>2008-06-11T11:47:59-07:00</authored-date>
  <message>Switched demo user find to use DEMO_USER_ID
This fixes the broken redirect bug if the demo user's name gets changed</message>
  <tree>39bff7ad5306eeac9fb2d8a083a8e1924829eadc</tree>
  <committer>
    <name>Michael Hartl</name>
    <email>michael@michaelhartl.com</email>
  </committer>
</commit>
