mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	/json/users: Replace email with user_id in API to reactivate user.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							06e7e933cc
						
					
				
				
					commit
					4162e61f33
				
			@@ -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'))
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user