| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function execute() |
||
| 11 | { |
||
| 12 | if (! $this->model->id) { |
||
| 13 | $result = wp_insert_user($this->model->object); |
||
| 14 | } else { |
||
| 15 | $result = wp_update_user($this->model->object); |
||
| 16 | } |
||
| 17 | |||
| 18 | if (is_wp_error($result)) { |
||
| 19 | throw new WP_ErrorException($result); |
||
| 20 | } |
||
| 21 | |||
| 22 | $this->model->setId($result); |
||
| 23 | } |
||
| 24 | } |
||
| 25 |