Send 2fa email and move user to waiting page when they need to re-validate email access

This commit is contained in:
Pea Tyczynska
2020-01-27 18:10:45 +00:00
parent a4fb1b6c06
commit caf77341b3
8 changed files with 100 additions and 8 deletions

View File

@@ -75,8 +75,10 @@ class UserApiClient(NotifyAdminAPIClient):
return user_data['data']
@cache.delete('user-{user_id}')
def update_password(self, user_id, password):
def update_password(self, user_id, password, from_email=False):
data = {"_password": password}
if from_email:
data["from_email"] = from_email
url = "/user/{}/update-password".format(user_id)
user_data = self.post(url, data=data)
return user_data['data']