Index: gallery_user.inc =================================================================== --- gallery_user.inc (revision 3368) +++ gallery_user.inc (working copy) @@ -150,6 +150,11 @@ } // Continue to creation case G2_USER_DOES_NOT_EXIST: + // If this is the anonymous user, don't try to create + if (empty($user->uid)) { + return array(true, null); + } + // Create the new user $ret = GalleryEmbed::createUser($user->uid, array('username' => $user->name,