Index: locallib.php
===================================================================
--- locallib.php	(revision 12081)
+++ locallib.php	(working copy)
@@ -2197,6 +2197,9 @@
                 if ($submission->late) {
                     continue;
                 }
+                if ($submission->userid == 0) {
+                    continue;
+                }
                 if (!$user = get_record("user", "id", $submission->userid)) {
                     error("Print league table: user not found");
                     }
