$record = User::model()->findByAttributes(array('user_login'=>$this->username));
if (is_null($record))
$this->errorCode=self::ERROR_USERNAME_INVALID;
elseif ($record->user_pswd !== md5(md5($this->password)))
$this->errorCode=self::ERROR_PASSWORD_INVALID;
elseif ($record->user_hospital_id !== HospitalList::model()->getHospitalId())
$this->errorCode=self::ERROR_ACCESS_DENIED;
else
{
$this->_id = $record->user_id;
$this->setState('title', $record->user_login);
$this->errorCode=self::ERROR_NONE;
}
<?php
/**
* @author Doniy Serhey <doniysa@gmail.com>
* @time : 12:11
* @date : 02/11/16
*/
$arr = [
'STATUS' => '200',
'MESSAGES' => [
],
'RESP' => [
'0' => [
'PIN' => 'DAC4584W-16CS71',
'BRAND' => 'KOYO',
'NAME' => 'Подшипник ступицы колеса перед прав лев',
'ARTID' => '5048420',
'PARNR' => '111785',
'KEYZAK' => '0000007684',
'RVALUE' => '10-100',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '94.00',
'PRICE' => '1883.28',
'WAERS' => 'RUB',
'DLVDT' => '20161107123000',
'ANALOG' => 'X',
],
'1' => [
'PIN' => 'DAC4584W-16CS71',
'BRAND' => 'KOYO',
'NAME' => 'Подшипник ступицы колеса перед прав лев',
'ARTID' => '5048420',
'PARNR' => '99812',
'KEYZAK' => '0000005573',
'RVALUE' => '52',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '52.00',
'PRICE' => '1965.88',
'WAERS' => 'RUB',
'DLVDT' => '20161114123000',
'ANALOG' => 'X',
],
'2' => [
'PIN' => '32790',
'BRAND' => 'FEBI',
'NAME' => 'Подшипник ступицы передней',
'ARTID' => '5364037',
'PARNR' => '99812',
'KEYZAK' => '0000005573',
'RVALUE' => '1',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '52.00',
'PRICE' => '4563.06',
'WAERS' => 'RUB',
'DLVDT' => '20161114123000',
'ANALOG' => 'X',
],
'3' => [
'PIN' => '981799',
'BRAND' => 'OPTIMAL',
'NAME' => 'Подшипник ступицы передний LEXUS RX300 03-08 981799',
'ARTID' => '5463535',
'PARNR' => '102586',
'KEYZAK' => '0000013629',
'RVALUE' => '3',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '86.00',
'PRICE' => '2247.90',
'WAERS' => 'RUB',
'DLVDT' => '20161104123000',
'ANALOG' => 'X',
],
'4' => [
'PIN' => '981799',
'BRAND' => 'OPTIMAL',
'NAME' => 'Подшипник ступицы передний LEXUS RX300 03-08 981799',
'ARTID' => '5463535',
'PARNR' => '88989',
'KEYZAK' => '0000003137',
'RVALUE' => '9',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '85.00',
'PRICE' => '2195.39',
'WAERS' => 'RUB',
'DLVDT' => '20161105150000',
'ANALOG' => 'X',
],
'5' => [
'PIN' => '981799',
'BRAND' => 'OPTIMAL',
'NAME' => 'Подшипник ступицы передний LEXUS RX300 03-08',
'ARTID' => '5463535',
'PARNR' => '99812',
'KEYZAK' => '0000005573',
'RVALUE' => '13',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '52.00',
'PRICE' => '2266.19',
'WAERS' => 'RUB',
'DLVDT' => '20161114123000',
'ANALOG' => 'X',
],
'6' => [
'PIN' => 'GP9A33048',
'BRAND' => 'MAZDA',
'NAME' => 'СТОПОРНОЕ КОЛЬЦО',
'ARTID' => '7433347',
'PARNR' => '165524',
'KEYZAK' => '0000015548',
'RVALUE' => '2',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '94.00',
'PRICE' => '1042.53',
'WAERS' => 'RUB',
'DLVDT' => '20161105150000',
'ANALOG' => 'X',
],
'7' => [
'PIN' => 'GP9A33048',
'BRAND' => 'MAZDA',
'NAME' => 'ШАЙБА СТОПОРНАЯ ПРУЖИННАЯ',
'ARTID' => '7433347',
'PARNR' => '93703',
'KEYZAK' => '0000004001',
'RVALUE' => '8',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '92.00',
'PRICE' => '391.76',
'WAERS' => 'RUB',
'DLVDT' => '20161107123000',
'ANALOG' => 'X',
],
'8' => [
'PIN' => 'GP9A33048',
'BRAND' => 'MAZDA',
'NAME' => 'Кольцо стопорное',
'ARTID' => '7433347',
'PARNR' => '91752',
'KEYZAK' => '0000003303',
'RVALUE' => '4',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '95.00',
'PRICE' => '609.47',
'WAERS' => 'RUB',
'DLVDT' => '20161110123000',
'ANALOG' => 'X',
],
'9' => [
'PIN' => 'GP9A33048',
'BRAND' => 'MAZDA',
'NAME' => 'ШАЙБА СТОПОРНАЯ ПРУЖИННАЯ',
'ARTID' => '7433347',
'PARNR' => '165530',
'KEYZAK' => '0000015641',
'RVALUE' => '25',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '88.00',
'PRICE' => '534.54',
'WAERS' => 'RUB',
'DLVDT' => '20161107123000',
'ANALOG' => 'X',
],
'10' => [
'PIN' => '941313',
'BRAND' => 'OPTIMAL',
'NAME' => 'Подшипник ступицы передний MAZDA 6 (GG, GY), CX-7 (ER), CX-9 (TB) 941313',
'ARTID' => '9409189',
'PARNR' => '94564',
'KEYZAK' => '0000004443',
'RVALUE' => '3',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '91.00',
'PRICE' => '1390.63',
'WAERS' => 'RUB',
'DLVDT' => '20161104123000',
'ANALOG' => 'X',
],
'11' => [
'PIN' => '941313',
'BRAND' => 'OPTIMAL',
'NAME' => 'Комплект подшипника ступицы колеса',
'ARTID' => '9409189',
'PARNR' => '111785',
'KEYZAK' => '0000007684',
'RVALUE' => '10-100',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '94.00',
'PRICE' => '1342.84',
'WAERS' => 'RUB',
'DLVDT' => '20161107123000',
'ANALOG' => 'X',
],
'12' => [
'PIN' => '40-30236-SX',
'BRAND' => 'STELLOX',
'NAME' => 'подшипник ступицы !передней\ Mazda CX-7 06>',
'ARTID' => '10022085',
'PARNR' => '0',
'KEYZAK' => 'MOV0000011',
'RVALUE' => '4',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '100.00',
'PRICE' => '1669.70',
'WAERS' => 'RUB',
'DLVDT' => '20161103123000',
'ANALOG' => 'X',
],
'13' => [
'PIN' => '40-30236-SX',
'BRAND' => 'STELLOX',
'NAME' => 'подшипник ступицы !передней\ Mazda CX-7 06>',
'ARTID' => '10022085',
'PARNR' => '0',
'KEYZAK' => 'MOV0000012',
'RVALUE' => '11',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '98.00',
'PRICE' => '1669.70',
'WAERS' => 'RUB',
'DLVDT' => '20161104123000',
'ANALOG' => 'X',
],
'14' => [
'PIN' => 'DAC45840045',
'BRAND' => 'TORQUE',
'NAME' => 'Подшипник ступицы DAC45840045',
'ARTID' => '11464746',
'PARNR' => '156494',
'KEYZAK' => '0000013281',
'RVALUE' => '1',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '90.00',
'PRICE' => '2494.52',
'WAERS' => 'RUB',
'DLVDT' => '20161105150000',
'ANALOG' => 'X',
],
'15' => [
'PIN' => 'DAC45840045',
'BRAND' => 'TORQUE',
'NAME' => 'Подшипник ступицы DAC 45840045',
'ARTID' => '11464746',
'PARNR' => '64315',
'KEYZAK' => '0000001283',
'RVALUE' => '3',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '89.00',
'PRICE' => '1036.63',
'WAERS' => 'RUB',
'DLVDT' => '20161107123000',
'ANALOG' => 'X',
],
'16' => [
'PIN' => 'DAC45840045',
'BRAND' => 'TORQUE',
'NAME' => 'Подшипник ступицы',
'ARTID' => '11464746',
'PARNR' => '70532',
'KEYZAK' => '0000001448',
'RVALUE' => '100',
'RDPRF' => '1',
'MINBM' => '1',
'VENSL' => '92.00',
'PRICE' => '1097.40',
'WAERS' => 'RUB',
'DLVDT' => '20161112150000',
'ANALOG' => 'X',
],
]];
$arr = json_decode(json_encode($arr));
var_dump($arr);
$respBase = (array) $arr->RESP;
$resp = array_map(function ($next) {
$next = (array) $next;
return [
'BRAND' => $next['BRAND'],'PRICE'=>$next['PRICE'],
];
}, $respBase);
var_dump($resp);
>> I’m currently writing an application using Laravel 5.2 but needed to send mail via SMTP with self-signed certificate
Отключить подписывание письма сертификатом нужно.
Собственно говоря вы в вендоре исправляя именно это и делали