user_cancel($edit, $uid, $method)
Cancel a user account.
Since the user cancellation process needs to be run in a batch, either Form API will invoke it, or batch_process() needs to be invoked after calling this function and should define the path to redirect to.
Parameters
array $edit: An array of submitted form values.
int $uid: The user ID of the user account to cancel.
string $method: The account cancellation method to use.
See also
_user_cancel()
File
core/modules/user/user.module, line 6