e
        setTimeout(() => { reloadPageContent(); }, 1000);
      });
    }

    // Update user group
    function updateUserGroup(){
      console.log("Info: editing user group");
      data = $('#editUserGroupsForm').serialize();
      $.post("{{ url_for('api') }}/users/update_user", data, function (data) {
        console.log(data);
        if (data.error_code >= 400){
          alert(data.error);
        }
        else {
          //Send toast notification
          createToast('User groups have been up