diff --git a/mo/db.py b/mo/db.py
index 429a930264c8bebe47786fad93eb0185a1671cb6..bb45a9d863246107868e7c43d61741717dc66936 100644
--- a/mo/db.py
+++ b/mo/db.py
@@ -303,6 +303,9 @@ class User(Base):
     def name_sort_key(self) -> Tuple[str, str]:
         return (locale.strxfrm(self.last_name), locale.strxfrm(self.first_name))
 
+    def is_inactive(self) -> bool:
+        return self.password_hash is None
+
 
 class Contest(Base):
     __tablename__ = 'contests'