diff --git a/mo/db.py b/mo/db.py
index 226aef6905462a5566102a38536c6937483aa908..77282ac2442e6862c2487d5f8c7826d6c214e380 100644
--- a/mo/db.py
+++ b/mo/db.py
@@ -370,7 +370,7 @@ class User(Base):
return (locale.strxfrm(self.last_name), locale.strxfrm(self.first_name))
def is_inactive(self) -> bool:
- return self.password_hash is None
+ return self.last_login is None
def get_system_user() -> User: