summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorBrendan Abolivier <contact@brendanabolivier.com>2019-04-17 14:57:39 +0100
committerGitHub <noreply@github.com>2019-04-17 14:57:39 +0100
commit91934025b93bec62c8f5bf12f1975b0c6bffde93 (patch)
tree0bd1029b31353d10868fa3cd3b3b22b70568e472 /synapse/api
parentMerge pull request #5071 from matrix-org/babolivier/3pid-check (diff)
parentSend out emails with links to extend an account's validity period (diff)
downloadsynapse-91934025b93bec62c8f5bf12f1975b0c6bffde93.tar.xz
Merge pull request #5047 from matrix-org/babolivier/account_expiration
Send out emails with links to extend an account's validity period
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/auth.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 976e0dd18b..4482962510 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -230,8 +230,9 @@ class Auth(object):
 
             # Deny the request if the user account has expired.
             if self._account_validity.enabled:
-                expiration_ts = yield self.store.get_expiration_ts_for_user(user)
-                if self.clock.time_msec() >= expiration_ts:
+                user_id = user.to_string()
+                expiration_ts = yield self.store.get_expiration_ts_for_user(user_id)
+                if expiration_ts and self.clock.time_msec() >= expiration_ts:
                     raise AuthError(
                         403,
                         "User account has expired",