finish feature #26
This commit is contained in:
@@ -105,7 +105,6 @@ class UserController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function actionDelete($id)
|
public function actionDelete($id)
|
||||||
{
|
{
|
||||||
// $this->findModel($id)->delete();
|
|
||||||
|
|
||||||
$user = $this->findModel($id);
|
$user = $this->findModel($id);
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ class UserSearch extends User
|
|||||||
'query' => $query,
|
'query' => $query,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$query->andWhere(['status' => User::STATUS_ACTIVE]);
|
||||||
|
|
||||||
$this->load($params);
|
$this->load($params);
|
||||||
|
|
||||||
if (!$this->validate()) {
|
if (!$this->validate()) {
|
||||||
@@ -55,6 +57,8 @@ class UserSearch extends User
|
|||||||
return $dataProvider;
|
return $dataProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$query->andFilterWhere([
|
$query->andFilterWhere([
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'status' => $this->status,
|
'status' => $this->status,
|
||||||
|
|||||||
@@ -201,4 +201,12 @@ class User extends ActiveRecord implements IdentityInterface
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function attributeLabels(){
|
||||||
|
return [
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user