]> jfr.im git - erebus.git/commitdiff
userinfo - avoid filling memory with nonexistent users
authorzonidjan <redacted>
Fri, 17 Aug 2018 23:01:38 +0000 (18:01 -0500)
committerzonidjan <redacted>
Fri, 17 Aug 2018 23:01:38 +0000 (18:01 -0500)
modules/userinfo.py

index fd706f1dc73b85c63b43f0a44d53b3ef37ae1336..e0df42a827f6f5612968349ee3b0435b629284ac 100644 (file)
@@ -48,7 +48,8 @@ def _getauth(thing):
                if thing.startswith("#"):
                        return thing
                else:
-                       if parent.user(thing).auth is not None:
+                       u = parent.user(thing, create=False)
+                       if u is not None and u.auth is not None:
                                return "#"+parent.user(thing).auth
        return None