Index: mailhandler.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mailhandler/mailhandler.module,v
retrieving revision 1.93
diff -u -r1.93 mailhandler.module
--- mailhandler.module	30 Jun 2007 01:04:35 -0000	1.93
+++ mailhandler.module	17 Aug 2007 09:36:15 -0000
@@ -330,9 +330,8 @@
 /**
  * Switch from original user to mail submision user and back.
  *
- * Note: You first need to run mailhandler_switch_user without
- * argument to store the current user. Call mailhandler_switch_user
- * without argument to set the user back to the original user.
+ * Note: Call mailhandler_switch_user without argument to set 
+ *       the user back to the original user.
  *
  * @param $uid The user ID to switch to
  *
@@ -342,16 +341,12 @@
   static $orig_user = array();
 
   if (isset($uid)) {
+    $orig_user[] = $user;
     $user = user_load(array('uid' => $uid));
   }
   // retrieve the initial user, can be called multiple times
   else if (count($orig_user)) {
     $user = array_shift($orig_user);
-    array_unshift($orig_user, $user);
-  }
-  // store the initial user
-  else {
-    $orig_user[] = $user;
   }
 }
 
