diff --git a/backend/controllers/UserController.php b/backend/controllers/UserController.php index 6fff26f..88a61e5 100644 --- a/backend/controllers/UserController.php +++ b/backend/controllers/UserController.php @@ -105,7 +105,6 @@ class UserController extends Controller */ public function actionDelete($id) { -// $this->findModel($id)->delete(); $user = $this->findModel($id); diff --git a/backend/models/UserSearch.php b/backend/models/UserSearch.php index 553b9e0..bbf528d 100644 --- a/backend/models/UserSearch.php +++ b/backend/models/UserSearch.php @@ -46,6 +46,8 @@ class UserSearch extends User $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); + + $query->andWhere(['status' => User::STATUS_ACTIVE]); $this->load($params); @@ -54,6 +56,8 @@ class UserSearch extends User // $query->where('0=1'); return $dataProvider; } + + $query->andFilterWhere([ 'id' => $this->id, diff --git a/common/models/User.php b/common/models/User.php index 2ab5921..dce1b33 100644 --- a/common/models/User.php +++ b/common/models/User.php @@ -201,4 +201,12 @@ class User extends ActiveRecord implements IdentityInterface } return $result; } + + + public function attributeLabels(){ + return [ + + ]; + } + }