diff --git a/src/Authentication.php b/src/Authentication.php index 0670901..4be6453 100644 --- a/src/Authentication.php +++ b/src/Authentication.php @@ -77,7 +77,7 @@ private function requestNewToken(): string 'grant_type' => 'client_credentials', 'client_id' => $this->clientId, 'client_secret' => $this->clientSecret, - 'scope' => 'api', +// 'scope' => 'api', // POST MERGER SEEMINGLY TAKE THIS OUT ], ]); diff --git a/src/Wrappers/Employee.php b/src/Wrappers/Employee.php index 101ecd6..cfe681f 100644 --- a/src/Wrappers/Employee.php +++ b/src/Wrappers/Employee.php @@ -25,6 +25,15 @@ protected function handle(): void } } } + /** + * Now we use just one ISAMS we need to rely on divisions to work out what school a staff member is in. + * NB: Isams makes 'divisions' null if empty, but our code in Pastoral Module expects an empty collection. + */ + if (isset($this->divisions)) { + $this->divisions = collect($this->divisions); + } else { + $this->divisions = collect(); + } if (isset($this->customFields)) { $this->customFields = collect($this->customFields);