diff --git a/src/controllers/AdminUserController.php b/src/controllers/AdminUserController.php index e3f8c1d1..d72dfc80 100644 --- a/src/controllers/AdminUserController.php +++ b/src/controllers/AdminUserController.php @@ -469,7 +469,7 @@ public function actions() }, "accessCallback" => function () { - if ($this->model) { + if ($this->model && class_exists(ShopOrder::class)) { return ShopOrder::find()->cmsSite()->andWhere(['cms_user_id' => $this->model->id])->exists(); } diff --git a/src/controllers/UserController.php b/src/controllers/UserController.php index 4b752bd9..ae9fc3ab 100644 --- a/src/controllers/UserController.php +++ b/src/controllers/UserController.php @@ -41,6 +41,8 @@ class UserController extends Controller public function init() { + parent::init(); + if (\Yii::$app->request->get(static::REQUEST_PARAM_USERNAME) && !$this->user) { throw new NotFoundHttpException("User not found or inactive"); } else { diff --git a/src/views/admin-storage/index.php b/src/views/admin-storage/index.php index 4e9117c4..184e8c39 100644 --- a/src/views/admin-storage/index.php +++ b/src/views/admin-storage/index.php @@ -7,7 +7,7 @@ */ ?>