Send out emails with links to extend an account's validity period

This commit is contained in:
Brendan Abolivier 2019-04-10 17:58:47 +01:00
parent 747aa9f8ca
commit 20f0617e87
17 changed files with 699 additions and 43 deletions

View file

@ -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",