Deletes an existing Z1User model.
If deletion is successful, the browser will be redirected to the 'index' page.
@param integer $id
@return mixed
188925
public function actionDeleteSelected($z1selected)
    {
        if (empty($z1selected)) {
            return 'z1selected 不能为空。';
        } else {
            Z1User::deleteAll(['id' => explode(',', $z1selected)]);

            Yii::$app->getSession()->setFlash('success', '批量删除成功');

            return $this->redirect(['index']);
        }
    }
799211
public function actionDelete(string $id)
    {
        $model = $this->findModel($id);
        Yii::$app->authManager->remove($model->item);
        Yii::$app->session->setFlash('success', Yii::t('yii2mod.rbac', 'Rule has been deleted.'));

        return $this->redirect(['index']);
    }
474182
public function actionDelete($id) 
	{
		$model=$this->loadModel($id);
		
		if(Yii::app()->request->isPostRequest) {
			// we only allow deletion via POST request
			$model->publish = 2;
			$model->modified_id = !Yii::app()->user->isGuest ? Yii::app()->user->id : null;
			
			if($model->update()) {
				echo CJSON::encode(array(
					'type' => 5,
					'get' => Yii::app()->controller->createUrl('manage'),
					'id' => 'partial-pages',
					'msg' => '<div class="errorSummary success"><strong>'.Yii::t('phrase', 'Pages success deleted.').'</strong></div>',
				));
			}
			Yii::app()->end();
		}

		$this->dialogDetail = true;
		$this->dialogGroundUrl = Yii::app()->controller->createUrl('manage');
		$this->dialogWidth = 350;

		$this->pageTitle = Yii::t('phrase', 'Delete Page: $page_name', array('$page_name'=>$model->title->message));
		$this->pageDescription = '';
		$this->pageMeta = '';
		$this->render('admin_delete');
	}
806564
public function delete($id)
    {
        if ($this->hasDeleteTrait($this->modelInstance)) {
            return $this->destroy($id);
        }

        return $this->modelInstance->destroy($id);
    }
1179786
public function destroy($id)
    {
        $this->user->delete($id);

        flash(trans('core::messages.resource.resource deleted', ['name' => trans('user::users.title.user')]));

        return redirect()->route('backend::user.user.index');
    }
1345797
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        if ($model->deleteWithRelated()) {
            Seo::deleteAll([
                'obj_type' => $model->term_type,
                'obj_id'   => $model->primaryKey,
            ]);
            set_flash_success_delete_content();
        } else {
            set_flash_error_delete_content();
        }

        return $this->goBack(request()->referrer);
    }
102503
public function destroy($id)
	{
		$level = "danger";
		$message = " You are not permitted to destroy user objects";

		if ( Shinobi::can ( config('watchtower.acl.user.destroy', false) ) ) {
			$this->model::destroy($id);
			$level = "warning";
			$message = "<i class='fa fa-check-square-o fa-1x'></i> Success! User deleted.";
		}

		return redirect()->route( config('watchtower.route.as') . 'user.index')
					->with( ['flash' => ['message' => $message, 'level' =>  $level] ] );
	}
568690
public function delete($id)
    {
        $istance = $this->getById($id);

        if (! $istance)
        {
            return false;
        }

        return $istance->delete();
    }
324547
public function delete($id = null)
    {
        $user = $this->Users->get($id);
        $this->request->allowMethod(['post', 'delete']);

        if ($this->Users->delete($user)) {
            $this->Flash->success(__('The user has been deleted.'));
        } else {
            $this->Flash->error(__('The user could not be deleted. Please, try again.'));
        }

        return $this->redirect(['action' => 'index']);
    }
183292
public function delete($id)
    {
        $this->loadModel('User.Users');
        $user = $this->Users->get($id, ['contain' => ['Roles']]);

        if (in_array(ROLE_ID_ADMINISTRATOR, $user->role_ids) &&
            $this->Users->countAdministrators() === 1
        ) {
            $this->Flash->danger(__d('user', 'You cannot remove this user as it is the last administrator available.'));
        } else {
            if ($this->Users->delete($user)) {
                NotificationManager::canceled($user)->send();
                $this->Flash->success(__d('user', 'User successfully removed!'));
                $this->redirect($this->referer());
            } else {
                $this->Flash->danger(__d('user', 'User could not be removed.'));
            }
        }

        $this->title(__d('user', 'Remove User Account'));
        $this->redirect($this->referer());
    }
1367164
public function destroy($id)
    {
        // get user by id
        $user = AppUser::withTrashed()->where('id', $id)->first();

        if (!$user) {
            return response()->json(null, 404);
        }

        // delete user
        $deleteUser = $user->forceDelete();

        return response()->json(null, 204);
    }
47394
public function delete($id)
    {
        $builder = ModuleRow::withoutGlobalScopes();
        if (auth()->user()->hasRoles('member')) {
            $builder->where(['user_id' => auth()->user()->id]);
        }
        $model = $builder->findOrFail($id);
        $name  = $model->name;
        if ($model->delete()) {
            event('notifications.item_has_been_deleted', ['variables' => ['user' => user(), 'item' => $model]]);
            return redirect_with_message(handles('antares::sample_module/index'), trans('antares/sample_module::messages.item_has_been_deleted', ['name' => $name]), 'success');
        }
        event('notifications.item_has_not_been_deleted', ['variables' => ['user' => user(), 'item' => $model]]);
        return redirect_with_message(handles('antares::sample_module/index'), trans('antares/sample_module::messages.item_has_not_been_deleted', ['name' => $name]), 'error');
    }
1060175
public function deleteAction($id)
    {
        $response = $this->getResponse();
        $this->model->deleteRecord($id);
        $response->setStatusCode(Response::HTTP_NO_CONTENT);

        return $response;
    }
1259047
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        Yii::$app->getAuthManager()->remove($model->item);
        Helper::invalidate();

        return $this->redirect(['index']);
    }
170050
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        if ($model->deleteWithRelated()) {
            set_flash_success_delete_content();
            Seo::deleteAll([
                'obj_type' => $model->name,
            ]);
            TermRelationships::deleteAll([
                'obj_type' => $model->name,
            ]);
        } else {
            set_flash_error_delete_content();
        }

        return $this->goBack(request()->referrer);
    }
943581
public function delete(string $id)
    {
        $url = $this->url.'/'.$id;

        return $this->curl->delete($url);
    }
492296
public function destroy($id)
    {
        try {
            $result = $this->service->destroy(Auth::user(), $id);

            if ($result) {
                return redirect('teams')->with('message', 'Successfully deleted');
            }

            return redirect('teams')->with('message', 'Failed to delete');
        } catch (Exception $e) {
            return back()->withErrors($e->getMessage());
        }
    }