modules/admin/controllers/AdminsController.php
/**
     * Deletes an existing Admins model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     * @param integer $id
     * @return mixed
     * @throws NotFoundHttpException if the model cannot be found
     */
Deletes an existing Admins model.
If deletion is successful, the browser will be redirected to the 'index' page.
@param integer $id
@return mixed
@throws NotFoundHttpException if the model cannot be found
Deletes an existing Admins model . If deletion is successful the browser will be redirected to the ' index ' page . @param integer $id @return mixed @throws NotFoundHttpException if the model cannot be found
public function actionDelete($id)
    {
        $this->findModel($id)->delete();
        $auth   =   \Yii::$app->authManager ;
        $auth->revokeAll( $id ) ;
        return $this->redirect(['index']);
    }
public function actionDelete ( $ id ) { $ this -> findModel ( $ id ) -> delete ( ) ; $ auth = \ Yii :: $ app -> authManager ; $ auth -> revokeAll ( $ id ) ; return $ this -> redirect ( [ 'index' ] ) ; }
Deletes an existing Admins model.
Deletes an existing Admins model .
// метод ниже очищает все права пользователя с id = $id