...
|
...
|
@@ -120,12 +120,10 @@ class AdminController extends BaseController |
|
|
$authManager = $this->authManager;
|
|
|
switch (true){
|
|
|
case $target == 'user' && $type == 'disable':
|
|
|
$model = Admin::findOne(Yii::$app->getRequest()->getQueryParam('id'));
|
|
|
$r = $model->load(['status'=>Admin::STATUS_DELETED],'') && $model->save();
|
|
|
$r = Admin::findOne(Yii::$app->getRequest()->getQueryParam('id'))->updateAll(['status'=>Admin::STATUS_DELETED]);
|
|
|
break;
|
|
|
case $target == 'user' && $type == 'enable':
|
|
|
$model = Admin::findOne(Yii::$app->getRequest()->getQueryParam('id'));
|
|
|
$r = $model->load(['status'=>Admin::STATUS_ACTIVE],'') && $model->save();
|
|
|
$r = Admin::findOne(Yii::$app->getRequest()->getQueryParam('id'))->updateAll(['status'=>Admin::STATUS_ACTIVE]);
|
|
|
break;
|
|
|
case $target == 'user' && $type == 'del':
|
|
|
$r = Admin::findOne(Yii::$app->getRequest()->getQueryParam('id'))->delete();
|
...
|
...
|
|