76 | | var_dump($usr_id); |
| 78 | $grp_data = $client->getGroup(array('grpnam' => 'Pracownicy')); |
| 79 | var_dump($grp_data); |
| 80 | |
| 81 | $res = $client->addUserToGroup($usr_id, $grp_data['grp_id']); |
| 82 | |
| 83 | $data = array( |
| 84 | 'orunsm' => 'TJ', |
| 85 | 'ndenam' => 'Testowa Jednostka', |
| 86 | 'ndetpe' => 'ORGCELL', |
| 87 | ); |
| 88 | $parent_id = $client->createOrganizationUnit($data); |
| 89 | var_dump($parent_id); |
| 90 | if (!$parent_id) exit(1); |
| 91 | |
| 92 | $data = array( |
| 93 | 'orunsm' => 'TS', |
| 94 | 'ndenam' => 'Testowe Stanowisko', |
| 95 | 'ndetpe' => 'POST', |
| 96 | 'prn_id' => $parent_id, |
| 97 | ); |
| 98 | $orunid = $client->createOrganizationUnit($data); |
| 99 | var_dump($orunid); |
| 100 | if (!$orunid) exit(1); |
| 101 | |
| 102 | $client->assignUserToOrganizationUnit($usr_id, $orunid); |