OpenCart 🇺🇦

Схема

public mixed addBanIP ( )

Аргументы

Аргумент Возможный тип Описание
У метода нет аргументов

Описание

Метод пока еще не документирован.

Исходный код

$this->language->load('sale/customer');

$json = array();

if (isset($this->request->post['ip'])) { 
	if (!$this->user->hasPermission('modify', 'sale/customer')) {
		$json['error'] = $this->language->get('error_permission');
	} else {
		$this->load->model('sale/customer');

		$this->model_sale_customer->addBanIP($this->request->post['ip']);

		$json['success'] = $this->language->get('text_success');
	}
}

$this->response->setOutput(json_encode($json));