original_string: public function actionDelete($id = null)
      {
          $model = User::find()->where(['id' => $id])->limit(1)->one();
          if (empty($model)) {
              $this->error(Yii::t('podium/flash', 'Sorry! We can not find Member with this ID.'));
              return $this->redirect(['admin/members']);
          }
          if ($model->id == User::loggedId()) {
              $this->error(Yii::t('podium/flash', 'Sorry! You can not delete your own account.'));
              return $this->redirect(['admin/members']);
          }
          if ($model->delete()) {
              PodiumCache::clearAfter('userDelete');
              Activity::deleteUser($model->id);
              Log::info('User deleted', $model->id, __METHOD__);
              $this->success(Yii::t('podium/flash', 'User has been deleted.'));
          } else {
              Log::error('Error while deleting user', $model->id, __METHOD__);
              $this->error(Yii::t('podium/flash', 'Sorry! There was some error while deleting the user.'));
          }
          return $this->redirect(['admin/members']);
      }
code: public function actionDelete($id = null)
      {
          $model = User::find()->where(['id' => $id])->limit(1)->one();
          if (empty($model)) {
              $this->error(Yii::t('podium/flash', 'Sorry! We can not find Member with this ID.'));
              return $this->redirect(['admin/members']);
          }
          if ($model->id == User::loggedId()) {
              $this->error(Yii::t('podium/flash', 'Sorry! You can not delete your own account.'));
              return $this->redirect(['admin/members']);
          }
          if ($model->delete()) {
              PodiumCache::clearAfter('userDelete');
              Activity::deleteUser($model->id);
              Log::info('User deleted', $model->id, __METHOD__);
              $this->success(Yii::t('podium/flash', 'User has been deleted.'));
          } else {
              Log::error('Error while deleting user', $model->id, __METHOD__);
              $this->error(Yii::t('podium/flash', 'Sorry! There was some error while deleting the user.'));
          }
          return $this->redirect(['admin/members']);
      }
code_tokens: public function actionDelete ( $ id = null ) { $ model = User :: find ( ) -> where ( [ 'id' => $ id ] ) -> limit ( 1 ) -> one ( ) ; if ( empty ( $ model ) ) { $ this -> error ( Yii :: t ( 'podium/flash' , 'Sorry! We can not find Member with this ID.' ) ) ; return $ this -> redirect ( [ 'admin/members' ] ) ; } if ( $ model -> id == User :: loggedId ( ) ) { $ this -> error ( Yii :: t ( 'podium/flash' , 'Sorry! You can not delete your own account.' ) ) ; return $ this -> redirect ( [ 'admin/members' ] ) ; } if ( $ model -> delete ( ) ) { PodiumCache :: clearAfter ( 'userDelete' ) ; Activity :: deleteUser ( $ model -> id ) ; Log :: info ( 'User deleted' , $ model -> id , __METHOD__ ) ; $ this -> success ( Yii :: t ( 'podium/flash' , 'User has been deleted.' ) ) ; } else { Log :: error ( 'Error while deleting user' , $ model -> id , __METHOD__ ) ; $ this -> error ( Yii :: t ( 'podium/flash' , 'Sorry! There was some error while deleting the user.' ) ) ; } return $ this -> redirect ( [ 'admin/members' ] ) ; }
docstring: Deleting the user of given ID.
  @param int $id
  @return Response
docstring_tokens: Deleting the user of given ID .