modules/user/controllers/DefaultController.php
/**
     * Deletes an existing User model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     * @param string $id
     * @return mixed
     * @throws NotFoundHttpException if the model cannot be found
     */
Deletes an existing User model.
If deletion is successful, the browser will be redirected to the 'index' page.
@param string $id
@return mixed
@throws NotFoundHttpException if the model cannot be found
Deletes an existing User model . If deletion is successful the browser will be redirected to the ' index ' page . @param string $id @return mixed @throws NotFoundHttpException if the model cannot be found
public function actionDelete($id)
    {
        $this->findModel($id)->delete();
        Yii::$app->user->logout();
        return $this->redirect(['/site/register']);
    }
public function actionDelete ( $ id ) { $ this -> findModel ( $ id ) -> delete ( ) ; Yii :: $ app -> user -> logout ( ) ; return $ this -> redirect ( [ '/site/register' ] ) ; }
Deletes an existing User model.
Deletes an existing User model .