Kicks a user from this server.
 @param user [User, #resolve_id] The user to kick.
 @param reason [String] The reason the user is being kicked.
488481
def kick(user, reason = nil)
      API::Server.remove_member(@bot.token, @id, user.resolve_id, reason)
    end
861557
def user_remove(user,
                host='localhost',
                **connection_args):
    '''
    
    '''
    dbc = _connect(**connection_args)
    if dbc is None:
        return False

    cur = dbc.cursor()
    qry = 'DROP USER %(user)s@%(host)s'
    args = {}
    args['user'] = user
    args['host'] = host
    try:
        _execute(cur, qry, args)
    except MySQLdb.OperationalError as exc:
        err = 'MySQL Error {0}: {1}'.format(*exc.args)
        __context__['mysql.error'] = err
        log.error(err)
        return False

    if not user_exists(user, host, **connection_args):
        log.info('User \'%s\'@\'%s\' has been removed', user, host)
        return True

    log.info('User \'%s\'@\'%s\' has NOT been removed', user, host)
    return False
840984
async def kickban(self, channel, target, reason=None, range=0):
        
        await self.ban(channel, target, range)
        await self.kick(channel, target, reason)
1342877
def drop_user(self, name):
        
        statement = ddl.DropUser(name)
        self._execute(statement)
106690
@Deactivate
    protected void deactivate(int reason) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Deactivating " + this, "reason=" + reason);
        }
        // purge cached data from config
        this.cachedEncoding = null;
        this.cachedLocale = null;
        this.localeMap.clear();
        this.converterMap.clear();
        this.supportedEncodingsCache.clear();
        this.localesCache.clear();
    }
617617
def stop(id, reason = '')
      params = { :id => id }
      requires params
      params[:reason] = reason
      DataSift.request(:POST, 'historics/stop', @config, params)
    end
954772
static function forceLogin(\Db\Connection $db, $user_id) {
    User::$instance = User::findUser($db, $user_id);
  }
1116040
def move(user, channel)
      API::Server.update_member(@bot.token, @id, user.resolve_id, channel_id: channel.resolve_id)
    end
231670
public synchronized void onRequestRejected(String reason) {
		allRequestsTracker.onRequestRejected(reason);
		recentRequestsTracker.onRequestRejected(reason);
		meter.mark();
	}
783049
def kick_idle():
    
    ## Who hasn't been typing?
    for client in CLIENT_LIST:
        if client.idle() > IDLE_TIMEOUT:
            print('-- Kicking idle lobby client from %s' % client.addrport())
            client.active = False
227800
public function unBlockUserByID($id, $reason = null)
	{
		// Get the token.
		$token = $this->getToken($id, 'unblock');

		// Build the request path.
		$path = '?action=unblock';

		// Build the request data.
		// TODO: $data doesn't seem to be used!
		$data = array(
			'id'     => $id,
			'token'  => $token,
			'reason' => $reason,
		);

		// Send the request.
		$response = $this->client->get($this->fetchUrl($path));

		return $this->validateResponse($response);
	}
292997
def delete_user(name, runas=None):
    '''
    
    '''
    if runas is None and not salt.utils.platform.is_windows():
        runas = salt.utils.user.get_user()
    res = __salt__['cmd.run_all'](
        [RABBITMQCTL, 'delete_user', name],
        reset_system_locale=False,
        python_shell=False,
        runas=runas)
    msg = 'Deleted'

    return _format_response(res, msg)
1049685
def deactivate_user(self, user):
        
        res = super(SessionAwareSQLAlchemyUserDatastore, self).deactivate_user(
            user)
        if res:
            delete_user_sessions(user)
        return res
516755
def quit(self, reason=''):
        
        with self.lock:
            self.keep_going = False
            self._quit(reason)
            self._socket.shutdown(self._m_socket.SHUT_RDWR)
            self._socket.close()
442522
func (r *RemoteService) KickUser(ctx context.Context, kick *protos.KickMsg) (*protos.KickAnswer, error) {
	logger.Log.Debugf("sending kick to user %s", kick.GetUserId())
	s := session.GetSessionByUID(kick.GetUserId())
	if s != nil {
		err := s.Kick(ctx)
		if err != nil {
			return nil, err
		}
		return &protos.KickAnswer{
			Kicked: true,
		}, nil
	}
	return nil, constants.ErrSessionNotFound
}
116960
private void kick()
    {
        if (!connected)
        {
            return;
        }
        messagesIn.clear();
        messagesOut.clear();
        try
        {
            out.close();
        }
        catch (final IOException exception)
        {
            Verbose.exception(exception, "Error on closing output");
        }
        try
        {
            in.close();
        }
        catch (final IOException exception)
        {
            Verbose.exception(exception, "Error on closing input");
        }
        try
        {
            socket.close();
        }
        catch (final IOException exception)
        {
            Verbose.exception(exception, "Error on closing socket");
        }
        for (final ConnectionListener listener : listeners)
        {
            listener.notifyConnectionTerminated(Byte.valueOf(getId()));
        }
        listeners.clear();
        connected = false;
        Verbose.info("Disconnected from the server !");
    }
876317
def activate_user(self, user):
        
        if not user.active:
            user.active = True
            return True
        return False