mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	static/js/settings_users: Replace logic with existing function.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							205657b3cf
						
					
				
				
					commit
					5a3f1e20ec
				
			@@ -80,14 +80,7 @@ exports.update_user_data = function (user_id, new_data) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (new_data.is_admin !== undefined || new_data.is_guest !== undefined) {
 | 
					    if (new_data.is_admin !== undefined || new_data.is_guest !== undefined) {
 | 
				
			||||||
        var person_obj = people.get_person_from_user_id(user_id);
 | 
					        user_row.find(".user_role").text(people.get_user_type(user_id));
 | 
				
			||||||
        if (person_obj.is_admin) {
 | 
					 | 
				
			||||||
            user_row.find(".user_role").text(i18n.t("Administrator"));
 | 
					 | 
				
			||||||
        } else if (person_obj.is_guest) {
 | 
					 | 
				
			||||||
            user_row.find(".user_role").text(i18n.t("Guest"));
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            user_row.find(".user_role").text(i18n.t("Member"));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user