Delete user account

    login : string
        login name

    CLI Example:

    .. code-block:: bash

        salt '*' pdbedit.delete wash
170147
def delete(login):
    '''
    
    '''
    if login in list_users(False):
        res = __salt__['cmd.run_all'](
            'pdbedit --delete {login}'.format(login=_quote_args(login)),
        )

        if res['retcode'] > 0:
            return {login: res['stderr'] if 'stderr' in res else res['stdout']}

        return {login: 'deleted'}

    return {login: 'absent'}
21795
public void zone_zoneName_dynHost_login_login_DELETE(String zoneName, String login) throws IOException {
		String qPath = "/domain/zone/{zoneName}/dynHost/login/{login}";
		StringBuilder sb = path(qPath, zoneName, login);
		exec(qPath, "DELETE", sb.toString(), null);
	}
1132203
def account_delete(request, username,
        template_name=accounts_settings.ACCOUNTS_PROFILE_DETAIL_TEMPLATE,
        extra_context=None, **kwargs):
    
    user = get_object_or_404(get_user_model(),
                             username__iexact=username)
    user.is_active = False
    user.save()

    return redirect(reverse('accounts_admin'))
519522
def remove_user(username):
    
    users = passwd_reader.load_users()

    assert username in users, "Username '%s' not found!" % username

    # remove user from passwd file
    del users[username]
    passwd_reader.save_users(users)

    # remove home directory
    home_dir = settings.DATA_PATH + username
    if os.path.exists(home_dir):
        shutil.rmtree(home_dir)

    reload_configuration()
807048
def delete(self):
        
        client = NAppsClient(self._config)
        client.delete(self.user, self.napp)
996194
def delete_custom_service_account(self, account, nickname, password):
        
        return self.post(
            url="https://api.weixin.qq.com/customservice/kfaccount/del",
            data={
                "kf_account": account,
                "nickname": nickname,
                "password": password
            }
        )
436533
def delete_account(self, data):
        
        error = False
        msg = ""

        username = self.user_manager.session_username()

        # Check input format
        result = self.database.users.find_one_and_delete({"username": username,
                                                          "email": data.get("delete_email", "")})
        if not result:
            error = True
            msg = _("The specified email is incorrect.")
        else:
            self.database.submissions.remove({"username": username})
            self.database.user_tasks.remove({"username": username})

            all_courses = self.course_factory.get_all_courses()

            for courseid, course in all_courses.items():
                if self.user_manager.course_is_open_to_user(course, username):
                    self.user_manager.course_unregister_user(course, username)

            self.user_manager.disconnect_user()
            raise web.seeother("/index")

        return msg, error
736308
def delete(name, remove=False, force=False):
    '''
    
    '''
    if salt.utils.stringutils.contains_whitespace(name):
        raise SaltInvocationError('Username cannot contain whitespace')
    if not info(name):
        return True

    # force is added for compatibility with user.absent state function
    if force:
        log.warning('force option is unsupported on MacOS, ignoring')

    # remove home directory from filesystem
    if remove:
        __salt__['file.remove'](info(name)['home'])

    # Remove from any groups other than primary group. Needs to be done since
    # group membership is managed separately from users and an entry for the
    # user will persist even after the user is removed.
    chgroups(name, ())
    return _dscl(['/Users/{0}'.format(name)], ctype='delete')['retcode'] == 0
1235856
def delete(self, accountId):
        """"""
        acct = BaseAccount.get(accountId)
        if not acct:
            raise Exception('No such account found')

        acct.delete()
        auditlog(event='account.delete', actor=session['user'].username, data={'accountId': accountId})

        return self.make_response('Account deleted')
1096816
def user_disable_login(attribs, dir_info)
      attribs = user_record_name_alternatives(attribs)

      check_critical_attribute( attribs, :record_name )
      attribs    = tidy_attribs(attribs)

      command = {attribute: 'disableuser', value: nil}
      params  = command.merge(attribs)
      # pwpolicy(params, dir_info)
      answer = pwpolicy(params, dir_info)
      attribs[:value] = nil
      return answer
    end
683131
def delete_user(self, user):
        
        name = utils.get_name(user)
        self._user_manager.delete(name)
1284830
function cmd_clean(args, done) {
    var user = args.user.data$()
    delete user.pass
    delete user.salt
    delete user.active
    delete user.$
    done(null, user)
  }
352355
def delete_user(self, username):
        

        url = self._options['server'] + '/rest/api/latest/user/?username=%s' % username

        r = self._session.delete(url)
        if 200 <= r.status_code <= 299:
            return True
        else:
            logging.error(r.status_code)
            return False
82049
def delete(options = {})
      options = options.merge(user_name: @user_name)
      resp = @client.delete_login_profile(options)
      resp.data
    end
390614
def delete(options = {})
      options = options.merge(
        user_name: @user_name,
        access_key_id: @id
      )
      resp = @client.delete_access_key(options)
      resp.data
    end
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)
674629
def delete_user(self, user_id):
        
        api = self._get_api(iam.AccountAdminApi)
        api.delete_user(user_id)
        return