Revoke this user's team membership.

        :param str username: (required), name of the team member
        :returns: bool
432592
def revoke_membership(self, username):
        
        url = self._build_url('memberships', username, base_url=self._api)
        return self._boolean(self._delete(url), 204, 404)
1241355
def is_name_revoked( self, name ):
        
        name = self.get_name( name )
        if name is None:
            return False 

        if name['revoked']:
            return True
        else:
            return False
211036
def delete_by_user_name(user_name):
        '''
        
        '''
        try:
            del_count = TabMember.delete().where(TabMember.user_name == user_name)
            del_count.execute()
            return True
        except:
            return False
580506
def is_username_valid(username):
    
    pattern = re.compile(r"^[a-zA-Z0-9_.-]+$")
    return bool(pattern.match(username))
1116420
def _check_team_login(team):
    
    contents = _load_auth()

    for auth in itervalues(contents):
        existing_team = auth.get('team')
        if team and team != existing_team:
            raise CommandException(
                "Can't log in as team %r; log out first." % team
            )
        elif not team and existing_team:
            raise CommandException(
                "Can't log in as a public user; log out from team %r first." % existing_team
            )
246954
def del_user(self, username):
        
        self._check_fix_users(username)
        try:
            del self.users[username]
        except Exception as e:
            raise UserDoesntExist(username, self.backend_name)
367140
def DeleteUser(username):
  """"""
  grr_api = maintenance_utils.InitGRRRootAPI()
  try:
    grr_api.GrrUser(username).Get().Delete()
  except api_errors.ResourceNotFoundError:
    raise UserNotFoundError(username)
1178269
def remove_member(self, login):
        
        warnings.warn(
            'This is no longer supported by the GitHub API, see '
            'https://developer.github.com/changes/2014-09-23-one-more-week'
            '-before-the-add-team-member-api-breaking-change/',
            DeprecationWarning)
        url = self._build_url('members', login, base_url=self._api)
        return self._boolean(self._delete(url), 204, 404)
1353418
async def remove_user(self, username):
        
        client_facade = client.UserManagerFacade.from_connection(
            self.connection())
        user = tag.user(username)
        await client_facade.RemoveUser([client.Entity(user)])
382303
def user_ban(channel, user):
    

    username = user.name
    if isinstance(user, discord.Member):
        if user.nick is not None:
            username = user.nick

    # Create embed UI object
    gui = ui_embed.UI(
        channel,
        "Banned {}".format(username),
        "{} has been banned from this server".format(username),
        modulename=modulename
    )

    return gui
711882
def clean_username(self):
        
        username = self.cleaned_data.get('username').split('@')[0]
        if not username:
            raise forms.ValidationError(_('Invalid username provided'))
        return username
388979
def clean_username(self):
        
        try:
            get_user_model().objects.get(
                username__iexact=self.cleaned_data['username'])
        except get_user_model().DoesNotExist:
            pass
        else:
            raise forms.ValidationError(_('This username is already taken.'))
        if self.cleaned_data['username'].lower() in accounts_settings.ACCOUNTS_FORBIDDEN_USERNAMES:
            raise forms.ValidationError(_('This username is not allowed.'))
        return self.cleaned_data['username']
1267470
def clean(self):
        
        if self.user:
            self.username = self.user.username
        elif not self.username:
            raise ValidationError({
                'username': _NOT_BLANK_MESSAGE,
                'user': _NOT_BLANK_MESSAGE
            })
476237
def remove_member(self, user, api=None):
        
        api = api or self._API
        AutomationMember.remove(automation=self.id, user=user, api=api)
569185
def change_username(self, username):
        
        username = username.lower()
        if self.username != username:
            if self.get_by_username(username):
                raise exceptions.AuthError("Username exists already")
            self.update(username=username)
1311170
def drop_user(self, username):
        
        text = "DROP USER {0}".format(quote_ident(username), method="POST")
        self.query(text, method="POST")
204357
def remove_member(self, member):
        
        select_action = 'remove_member'

        self._update_scope_project_team(select_action=select_action, user=member, user_type='member')