commit aa44084f8412725049eab5e405965a4aaf15ddf3
Author: Kirill Astashov <kirill.astashov@netspot.com.au>
Date:   Mon Apr 23 14:39:28 2012 +0930

    UWA-236: Fix calendar inserting incorrect userid into group events

diff --git a/calendar/lib.php b/calendar/lib.php
index 92fd12c..ec9b419 100644
--- a/calendar/lib.php
+++ b/calendar/lib.php
@@ -1792,7 +1792,7 @@ class calendar_event {
         }
 
         // Default to the current user
-        if (empty($data->userid)) {
+        if (!isset($data->userid)) {
             $data->userid = $USER->id;
         }
 
