| Conditions | 3 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 40 | public function afterExecute(\Magento\User\Controller\Adminhtml\User\Save $subject) |
||
| 41 | { |
||
| 42 | $userId = (int)$subject->getRequest()->getParam('user_id'); |
||
| 43 | if ($userId === 0) { |
||
| 44 | return []; |
||
| 45 | } |
||
| 46 | $data = $this->_filterData($subject->getRequest()->getParams()); |
||
| 47 | |||
| 48 | try { |
||
| 49 | |||
| 50 | /** @var \Firegento\DevDashboard\Model\Config $model */ |
||
| 51 | $model = $this->_configRepository->getByUserId($userId); |
||
| 52 | $model->setData($data); |
||
| 53 | $this->_configRepository->save($model); |
||
| 54 | } catch (\Exception $e) { |
||
| 55 | $this->_messageManager->addErrorMessage($e->getMessage()); |
||
| 56 | } |
||
| 57 | return []; |
||
| 58 | } |
||
| 69 |