Deletes a customer inscription

@param OneClickRemoveUserInput $removeUserInput Customer details to remove
@return mixed
@throws \Freshwork\Transbank\Exceptions\InvalidCertificateException
@throws \SoapFault
435838
public function removeUser(OneClickRemoveUserInput $removeUserInput)
    {
        $removeUser = new RemoveUser();
        $removeUser->arg0 = $removeUserInput;
        return $this->callSoapMethod('removeUser', $removeUser);
    }
253882
public function remove($user)
    {
        $this->load();
        if (!isset($this->users[$user])) {
            return false;
        }
        unset($this->users[$user]);
        return true;
    }
1123594
protected function executeRemoveDomain(InputInterface $input, OutputInterface $output) {

        // If no domains are left, exit
        if (empty($this->environment->domains)) {
            $output->writeln('<comment>There are no domains assigned to this environment!</comment>');
            exit;
        }

        // Ask for a domain
        if ($input->getArgument('domain') == NULL) {
            $helper = $this->getHelper('question');
            $domains = $this->environment->domains;
            $question = new ChoiceQuestion(
                'Which domain would you like to remove? ',
                $domains,
                null
            );
            $name = $helper->ask($input, $output, $question);
        }

        // Confirm removal.
        $helper = $this->getHelper('question');
        $question = new ConfirmationQuestion("Remove the domain <comment>$name</comment> from the environment <info>{$this->app->name}:{$this->environment->name}</info> [y/N]? ", FALSE);

        if (!$helper->ask($input, $output, $question)) {
            $output->writeln("<fg=red>Domain not removed.</>");
            $output->writeln('');
            exit;
        }

        // Find and remove the domain from the config.
        $key = array_search($name, $this->environment->domains);
        unset($this->environment->domains[$key]);

        // Save the new version to the config.
        $this->getApplication()->getTerra()->getConfig()->add('apps', array($this->app->name, 'environments', $this->environment->name), (array) $this->environment);
        $this->getApplication()->getTerra()->getConfig()->save();
        $output->writeln("<info>Domain removed.</info> Changes won't take effect until the environment is restarted.");
        $output->writeln('');
    }
124034
public function delete(array $input)
   {
     $count = 0;

     $this->DB->transaction(function() use ($input, &$count)
     {
       $loggedUserId = $this->AuthenticationManager->getLoggedUserId();
       $organizationId = $this->AuthenticationManager->getCurrentUserOrganization('id');

       foreach ($input['id'] as $key => $id)
       {
         $count++;

         $VoucherType = $this->VoucherType->byId($id);

         $Journal = $this->Journal->create(array('journalized_id' => $id, 'journalized_type' => $this->VoucherType->getTable(), 'user_id' => $loggedUserId, 'organization_id' => $organizationId));
         $this->Journal->attachDetail($Journal->id, array('note' => $this->Lang->get('decima-accounting::voucher-type-management.deletedJournal', array('name' => $VoucherType->name))), $Journal);

         $this->VoucherType->delete(array($id));
       }
     });

     if($count == 1)
     {
       return json_encode(array('success' => $this->Lang->get('form.defaultSuccessDeleteMessage')));
     }
     else
     {
       return json_encode(array('success' => $this->Lang->get('form.defaultSuccessDeleteMessage1')));
     }
   }
1245226
public function deleteUser(User $user)
    {

        /* When the api will identify a user, please uncomment this
        if ($this->container->get('security.token_storage')->getToken()->getUser()->getId() === $user->getId()) {
            throw new \Exception('A user cannot delete himself');
        }*/
        $userRole = $this->roleManager->getUserRoleByUser($user);

        //soft delete~
        $user->setMail('mail#' . $user->getId());
        $user->setFirstName('firstname#' . $user->getId());
        $user->setLastName('lastname#' . $user->getId());
        $user->setPlainPassword(uniqid());
        $user->setUsername('username#' . $user->getId());
        $user->setPublicUrl('removed#' . $user->getId());
        $user->setAdministrativeCode('code#' . $user->getId());
        $user->setIsEnabled(false);

        // keeping the user's workspace with its original code
        // would prevent creating a user with the same username
        // todo: workspace deletion should be an option
        $ws = $user->getPersonalWorkspace();

        if ($ws) {
            $ws->setCode($ws->getCode() . '#deleted_user#' . $user->getId());
            $ws->setDisplayable(false);
            $this->objectManager->persist($ws);
        }

        if ($userRole) {
            $this->objectManager->remove($userRole);
        }
        $this->objectManager->persist($user);
        $this->objectManager->flush();

        $this->strictEventDispatcher->dispatch('claroline_users_delete', 'GenericDatas', array(array($user)));
        $this->strictEventDispatcher->dispatch('log', 'Log\LogUserDelete', array($user));
        $this->strictEventDispatcher->dispatch('delete_user', 'DeleteUser', array($user));
    }
267862
public function removeMember($id, $userId)
    {
        try {
            $result = $this->service->remove(Auth::user(), $id, $userId);

            if ($result) {
                return back()->with('message', 'Successfully removed member');
            }

            return back()->with('message', 'Failed to remove member');
        } catch (Exception $e) {
            return back()->withErrors($e->getMessage());
        }
    }
229930
private function removeResource(InputInterface $input, OutputInterface $output)
    {
        $resource = $input->getOption('resource');
        $output->writeln(
            sprintf('<comment>Removing resource <info>%s</info></comment>', $resource)
        );

        $api = $this->getCloudinaryApi();

        $response = $api->delete_resources($resource);
        $this->outputApiResponse($response, 'deleted', $output);
    }
45556
protected function executeDelete(InputInterface $input, OutputInterface $output)
    {
        $this->doIndexCleanup($input->getArgument('id'));
        $this->doIndexCommit();

        return 0;
    }
788318
public function deleteUser($userId)
    {
        $user = $this->userService->loadUser($userId);

        if ($user->id == $this->repository->getCurrentUser()->id) {
            throw new Exceptions\ForbiddenException('Currently authenticated user cannot be deleted');
        }

        $this->userService->deleteUser($user);

        return new Values\NoContent();
    }
116074
public function handleRemove(int $userId) : void
    {
        if ($this->presenter->isAjax())
        {
            $this->userEntity = $this->userRepository->findOneById($userId);

            $allowRemove = (
                (
                    !$this->userEntity->isInRole(UserAuthorizator::ROLE_ADMIN)
                    || $this->presenter->user->isAllowed(UserAuthorizator::RES_EDIT_ADMINS)
                )
                && $this->presenter->user->isAllowed(UserAuthorizator::RES_REMOVE_HANDLE)
                && $userId !== $this->presenter->user->getId()
            );

            if (!$allowRemove)
            {
                throw new ForbiddenRequestException;
            }

            $this->userManager->delete($this->userEntity);

            $this->presenter->notificationAjax(
                'Uživatel odstaněn.',
                "Uživatel {$this->userEntity->getEmail()} byl úspěšně odstaněn.",
                    'info',
                    FALSE
                );

            $this->presenter->handleModalToggle('hide', '#wakers_user_remove_modal', FALSE);

            $this->onRemove();
        }
    }
285233
public function removeVote(
        CommentInterface $comment,
        $authorToken
    ) {
        /**
         * @var VoteInterface $vote
         */
        $vote = $this
            ->commentVoteObjectDirector
            ->findOneBy([
                'authorToken' => $authorToken,
                'comment' => $comment,
            ]);

        if ($vote instanceof VoteInterface) {
            $this
                ->commentVoteObjectDirector
                ->remove($vote);
        }

        return $this;
    }
294362
function cancelSubmission($submissionTicket, $comment = NULL) {
		if ($comment == NULL) {
			$cancelSubmissionRequest = new cancelSubmission ();
			$cancelSubmissionRequest->submissionId = $submissionTicket;
			return $this->submissionService->cancelSubmission ( $cancelSubmissionRequest )->return;
		} else {
			$cancelSubmissionRequest = new cancelSubmissionWithComment ();
			$cancelSubmissionRequest->comment = $comment;
			$cancelSubmissionRequest->submissionId = $submissionTicket;
			return $this->submissionService->cancelSubmissionWithComment ( $cancelSubmissionRequest )->return;
		}
	}
54904
public function delete(array $input)
    {
        if(isset($input[$this->id_field_name]) && ! empty($input[$this->id_field_name]))
        {
            try
            {
                $this->r->delete($input[$this->id_field_name]);
            }
            catch(ModelNotFoundException $e)
            {
                $this->errors = new MessageBag(array("model" => "Element does not exists."));
                throw new NotFoundException();
            }
            catch(PermissionException $e)
            {
                $this->errors = new MessageBag(array("model" => "Cannot delete this item, please check that the item is not already associated to any other element, in that case remove the association first."));
                throw new PermissionException();
            }
        }
        else
        {
            $this->errors = new MessageBag(array("model" => "Id not given"));
            throw new NotFoundException();
        }
    }
619296
public function trash($user)
    {
        return MessageNotification::where('user_id', $user->getKey())
            ->where('message_id', $this->id)
            ->delete();
    }
891108
public function removeUser(\WobbleCode\UserBundle\Document\User $user)
    {
        $this->users->removeElement($user);
    }
265633
public void removeMember(User user) {
        long userId = user.getId();
        members.remove(userId);
        nicknames.remove(userId);
        selfMuted.remove(userId);
        selfDeafened.remove(userId);
        muted.remove(userId);
        deafened.remove(userId);
        getRoles().forEach(role -> ((RoleImpl) role).removeUserFromCache(user));
        joinedAtTimestamps.remove(userId);
    }
1197138
public function delete($customerOrId = null, $addressId = null)
    {
        $this->_validateId($addressId);
        $customerId = $this->_determineCustomerId($customerOrId);
        $path = $this->_config->merchantPath() . '/customers/' . $customerId . '/addresses/' . $addressId;
        $this->_http->delete($path);
        return new Result\Successful();
    }