--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -313,6 +313,8 @@
 
     @classmethod
     def by_username(cls, name):
+        if not name:
+            return cls.anonymous()
         return plugin.AuthenticationProvider.get(request).by_username(name)
 
     @classmethod