Как правильно объявить токен в админке – admin/controller/common/header.php ?
так выдает ошибку
Notice: Undefined index: user_token in /home/xxx/storage/modification/admin/controller/common/header.php on line 39
Код:
$data['user_token'] = $this->session->data['user_token'];
Notice: Undefined index: user_token in /home/xxx/storage/modification/admin/controller/common/header.php on line 39
Код:
<?php
class ControllerCommonHeader extends Controller {
public function index() {
$data['title'] = $this->document->getTitle();
if ($this->request->server['HTTPS']) {
$data['base'] = HTTPS_SERVER;
} else {
$data['base'] = HTTP_SERVER;
}
// объявить токен
$data['user_token'] = $this->session->data['user_token'];
// END объявить токен
$data['description'] = $this->document->getDescription();
$data['keywords'] = $this->document->getKeywords();
$data['links'] = $this->document->getLinks();
$data['styles'] = $this->document->getStyles();
$data['scripts'] = $this->document->getScripts();
$data['lang'] = $this->language->get('code');
$data['direction'] = $this->language->get('direction');
Последнее редактирование: