/json/users: Replace email with user_id in API to reactivate user.

This commit is contained in:
Yashashvi Dave
2018-05-17 23:15:13 +05:30
committed by Tim Abbott
parent 06e7e933cc
commit 4162e61f33
5 changed files with 11 additions and 10 deletions

View File

@@ -79,9 +79,9 @@ def _deactivate_user_profile_backend(request: HttpRequest, user_profile: UserPro
return json_success()
def reactivate_user_backend(request: HttpRequest, user_profile: UserProfile,
email: str) -> HttpResponse:
user_id: int) -> HttpResponse:
try:
target = get_user(email, user_profile.realm)
target = get_user_profile_by_id_in_realm(user_id, user_profile.realm)
except UserProfile.DoesNotExist:
return json_error(_('No such user'))