user->identity->type === 'administrator'
- || yii::$app->user->identity->type === 'moderator'
+ !yii::$app->user->isGuest
+ && (yii::$app->user->identity->type === 'administrator'
+ || yii::$app->user->identity->type === 'moderator')
) : ?>
= $model['desc'] ?? 'Без описания' ?>
@@ -174,8 +178,9 @@ use app\models\Product;
user->identity->type === 'administrator'
- || yii::$app->user->identity->type === 'moderator'
+ !yii::$app->user->isGuest
+ && (yii::$app->user->identity->type === 'administrator'
+ || yii::$app->user->identity->type === 'moderator')
) : ?>
\ No newline at end of file
diff --git a/mirzaev/skillparts/system/views/profile/index.php b/mirzaev/skillparts/system/views/profile/index.php
index 7e08539..8660d13 100644
--- a/mirzaev/skillparts/system/views/profile/index.php
+++ b/mirzaev/skillparts/system/views/profile/index.php
@@ -6,7 +6,10 @@ use yii;
use yii\bootstrap\ActiveForm;
// Инициализация
-if (yii::$app->user->identity->agnt) {
+if (
+ !yii::$app->user->isGuest
+ && yii::$app->user->identity->agnt
+) {
$panel ?? $panel = 'profile_panel_settings_import';
} else {
$panel ?? $panel = 'profile_panel_settings_account';
@@ -27,7 +30,10 @@ if (yii::$app->user->identity->agnt) {
- user->identity->agnt) : ?>
+ user->isGuest
+ && yii::$app->user->identity->agnt
+ ) : ?>
/>
2
@@ -88,7 +97,8 @@ if (yii::$app->user->identity->agnt) {
user->identity->type === 'administrator'
+ !yii::$app->user->isGuest
+ && yii::$app->user->identity->type === 'administrator'
|| yii::$app->user->identity->type === 'moderator'
) : ?>
diff --git a/mirzaev/skillparts/system/views/profile/monitoring.php b/mirzaev/skillparts/system/views/profile/monitoring.php
index 28b51bd..ae67f0c 100644
--- a/mirzaev/skillparts/system/views/profile/monitoring.php
+++ b/mirzaev/skillparts/system/views/profile/monitoring.php
@@ -23,12 +23,12 @@ $panel ?? $panel = 'profile_panel_monitoring_input_search_history';
-
/>
+
/>
История заказов в разработке
-
/>
+
/>
jrnl;
- $date = empty($row->jrnl) ? '' : date('H:i d.m.Y', end($time)['date']);
+ foreach ($search_history ?? [] as $row) {
+ // Инициализация
+ $time = $row->jrnl;
+ $date = empty($row->jrnl) ? '' : date('H:i d.m.Y', end($time)['date']);
- echo <<
$row->ipv4
$row->text
$date
HTML;
- }
+ }
?>
$page
@@ -66,7 +66,7 @@ $panel ?? $panel = 'profile_panel_monitoring_input_search_history';
-
/>
+
/>
Журнал в разработке
@@ -79,8 +79,9 @@ $panel ?? $panel = 'profile_panel_monitoring_input_search_history';
user->identity->type === 'administrator'
- || yii::$app->user->identity->type === 'moderator'
+ !yii::$app->user->isGuest
+ && (yii::$app->user->identity->type === 'administrator'
+ || yii::$app->user->identity->type === 'moderator')
) : ?>
\ No newline at end of file
diff --git a/mirzaev/skillparts/system/views/profile/sidebar.php b/mirzaev/skillparts/system/views/profile/sidebar.php
index c36d980..ec4effb 100644
--- a/mirzaev/skillparts/system/views/profile/sidebar.php
+++ b/mirzaev/skillparts/system/views/profile/sidebar.php
@@ -19,8 +19,9 @@ use app\models\SupplyEdgeProduct;
user->identity->type === 'administrator'
- || yii::$app->user->identity->type === 'moderator'
+ !yii::$app->user->isGuest
+ && (yii::$app->user->identity->type === 'administrator'
+ || yii::$app->user->identity->type === 'moderator')
) {
// Пользователь является доверенным
diff --git a/mirzaev/skillparts/system/views/profile/supplies.php b/mirzaev/skillparts/system/views/profile/supplies.php
index 0d54e5f..aee3e9d 100644
--- a/mirzaev/skillparts/system/views/profile/supplies.php
+++ b/mirzaev/skillparts/system/views/profile/supplies.php
@@ -65,8 +65,9 @@ $panel ?? $panel = 'profile_panel_supplies_input_import';
user->identity->type === 'administrator'
- || yii::$app->user->identity->type === 'moderator'
+ !yii::$app->user->isGuest
+ && (yii::$app->user->identity->type === 'administrator'
+ || yii::$app->user->identity->type === 'moderator')
) : ?>
\ No newline at end of file
diff --git a/mirzaev/skillparts/system/views/search/index.php b/mirzaev/skillparts/system/views/search/index.php
index 30bd0fe..39a3371 100644
--- a/mirzaev/skillparts/system/views/search/index.php
+++ b/mirzaev/skillparts/system/views/search/index.php
@@ -150,8 +150,9 @@
user->identity->type === 'administrator'
- || yii::$app->user->identity->type === 'moderator'
+ !yii::$app->user->isGuest
+ && (yii::$app->user->identity->type === 'administrator'
+ || yii::$app->user->identity->type === 'moderator')
) : ?>
\ No newline at end of file