Index: webform_submissions.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform_submissions.inc,v
retrieving revision 1.6.2.15
diff -u -r1.6.2.15 webform_submissions.inc
--- webform_submissions.inc	6 Oct 2008 02:57:50 -0000	1.6.2.15
+++ webform_submissions.inc	6 Oct 2008 03:28:14 -0000
@@ -220,7 +220,7 @@
  *   Boolean TRUE if the user has exceeded their limit. FALSE otherwise.
  */
 function _webform_submission_limit_check($node) {
-  global $user, $db_type;
+  global $user;
 
   // Check if submission limiting is enabled.
   if ($node->webform['submit_limit'] == '-1') {
@@ -237,7 +237,8 @@
   $num_submissions_database = db_result(db_query($query, $user->uid, ip_address(), $user->uid, ($node->webform['submit_interval'] != -1) ? (time() - $node->webform['submit_interval']) : $node->webform['submit_interval'], $node->nid));
 
   // Double check the submission history from the users machine using cookies.
-  if (variable_get("webform_use_cookies", 0)) {
+  $num_submissions_cookie = 0;
+  if ($user->uid == 0 && variable_get("webform_use_cookies", 0)) {
     $cookie_name = 'webform-'. $node->nid;
 
     if (isset($_COOKIE[$cookie_name]) && is_array($_COOKIE[$cookie_name])) {
@@ -259,21 +260,7 @@
     // Limit exceeded.
     return TRUE;
   }
-  else {
-    // Increment a cookie for triple recording of the submission.
-    if (variable_get("webform_use_cookies", 0)) {
-      $attempted_key = 0;
-      if ($num_submissions_cookie > 0) {
-        while (array_key_exists($attempted_key, $_COOKIE[$cookie_name])) {
-          $attempted_key++;
-        }
-      }
-      // Set a cookie including the server's submission time.
-      // The cookie expires in the length of the interval plus a day to compensate for different timezones.
-      setcookie($cookie_name ."[". $attempted_key ."]", time(), time() + $node->webform['submit_interval'] + 86400);
-    }
 
-    // Limit not exceeded.
-    return FALSE;
-  }
+  // Limit not exceeded.
+  return FALSE;
 }
