From e827ea333ddb4b09110171f5b82a6886cf3991c0 Mon Sep 17 00:00:00 2001 From: Colin Hall Date: Wed, 2 Sep 2020 10:43:46 +0100 Subject: [PATCH 1/4] Correct User UpdatePassword bug --- src/User.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/User.php b/src/User.php index 791fbd8..f5f4469 100644 --- a/src/User.php +++ b/src/User.php @@ -2,6 +2,7 @@ namespace MacsiDigital\Zoom; +use MacsiDigital\Zoom\Exceptions\ValidationException; use MacsiDigital\Zoom\Support\Model; use MacsiDigital\Zoom\Exceptions\FileTooLargeException; @@ -117,10 +118,10 @@ public function updateStatus($status) public function updatePassword($password) { - if(count($password) < 8){ + if(strlen($password) >= 8){ return $this->newQuery()->sendRequest('put', ['users/'.$this->id.'/password', ['password' => $password]])->successful(); } else { - throw new ValidationException('Password must be 8 characters'); + throw new ValidationException('Password must be at least 8 characters'); } } From 00c41a186e3b81c6235a0d8450f9e134bd0cc116 Mon Sep 17 00:00:00 2001 From: Colin Hall Date: Mon, 7 Sep 2020 15:42:42 +0100 Subject: [PATCH 2/4] Bug fix Change weekly_days to string from integer --- src/Requests/StoreRecurrence.php | 2 +- src/Requests/UpdateRecurrence.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Requests/StoreRecurrence.php b/src/Requests/StoreRecurrence.php index c7f495b..04c4c4b 100644 --- a/src/Requests/StoreRecurrence.php +++ b/src/Requests/StoreRecurrence.php @@ -10,7 +10,7 @@ class StoreRecurrence extends PersistResource protected $persistAttributes = [ "type" => "nullable|integer|in:1,2,3", "repeat_interval" => "nullable|integer", - "weekly_days" => "nullable|integer|in:1,2,3,4,5,6,7", + "weekly_days" => "nullable|string", "monthly_day" => "nullable|numeric|between:1,31", "monthly_week" => "nullable|numeric|in:-1,1,2,3,4", "monthly_week_day" => "nullable|integer|in:1,2,3,4,5,6,7", diff --git a/src/Requests/UpdateRecurrence.php b/src/Requests/UpdateRecurrence.php index 808a9ec..304f227 100644 --- a/src/Requests/UpdateRecurrence.php +++ b/src/Requests/UpdateRecurrence.php @@ -10,7 +10,7 @@ class UpdateRecurrence extends PersistResource protected $persistAttributes = [ "type" => "nullable|integer|in:1,2,3", "repeat_interval" => "nullable|integer", - "weekly_days" => "nullable|integer|in:1,2,3,4,5,6,7", + "weekly_days" => "nullable|string", "monthly_day" => "nullable|numeric|between:1,31", "monthly_week" => "nullable|numeric|in:-1,1,2,3,4", "monthly_week_day" => "nullable|integer|in:1,2,3,4,5,6,7", From ad45dcd6538f320208b93d60b58cbd7f7fb10b8c Mon Sep 17 00:00:00 2001 From: Colin Hall Date: Mon, 7 Sep 2020 16:05:09 +0100 Subject: [PATCH 3/4] Update WebinarRegistrant.php Add find to WebinarRegistrants --- src/WebinarRegistrant.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WebinarRegistrant.php b/src/WebinarRegistrant.php index b5887da..5d50a39 100644 --- a/src/WebinarRegistrant.php +++ b/src/WebinarRegistrant.php @@ -10,7 +10,7 @@ class WebinarRegistrant extends Model protected $endPoint = 'webinars/{webinar:id}/registrants'; - protected $allowedMethods = ['get', 'post', 'put']; + protected $allowedMethods = ['find', 'get', 'post', 'put']; protected $apiMultipleDataField = 'registrants'; From 250ccd198d7373ee2a39fe96602ccf4ef0cf0429 Mon Sep 17 00:00:00 2001 From: colinhall17 Date: Fri, 11 Sep 2020 10:00:10 +0000 Subject: [PATCH 4/4] Fix styling --- src/Requests/StoreRecurrence.php | 16 ++++++++-------- src/Requests/UpdateRecurrence.php | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Requests/StoreRecurrence.php b/src/Requests/StoreRecurrence.php index ea9d8a8..bd1e864 100644 --- a/src/Requests/StoreRecurrence.php +++ b/src/Requests/StoreRecurrence.php @@ -7,13 +7,13 @@ class StoreRecurrence extends PersistResource { protected $persistAttributes = [ - "type" => "nullable|integer|in:1,2,3", - "repeat_interval" => "nullable|integer", - "weekly_days" => "nullable|string", - "monthly_day" => "nullable|numeric|between:1,31", - "monthly_week" => "nullable|numeric|in:-1,1,2,3,4", - "monthly_week_day" => "nullable|integer|in:1,2,3,4,5,6,7", - "end_times" => "nullable|numeric|max:50|exclude_unless:end_date_time,null", - "end_date_time" => "nullable|date|exclude_unless:end_times,null", + "type" => "nullable|integer|in:1,2,3", + "repeat_interval" => "nullable|integer", + "weekly_days" => "nullable|string", + "monthly_day" => "nullable|numeric|between:1,31", + "monthly_week" => "nullable|numeric|in:-1,1,2,3,4", + "monthly_week_day" => "nullable|integer|in:1,2,3,4,5,6,7", + "end_times" => "nullable|numeric|max:50|exclude_unless:end_date_time,null", + "end_date_time" => "nullable|date|exclude_unless:end_times,null", ]; } diff --git a/src/Requests/UpdateRecurrence.php b/src/Requests/UpdateRecurrence.php index bd683a4..3c00ce3 100644 --- a/src/Requests/UpdateRecurrence.php +++ b/src/Requests/UpdateRecurrence.php @@ -7,13 +7,13 @@ class UpdateRecurrence extends PersistResource { protected $persistAttributes = [ - "type" => "nullable|integer|in:1,2,3", - "repeat_interval" => "nullable|integer", - "weekly_days" => "nullable|string", - "monthly_day" => "nullable|numeric|between:1,31", - "monthly_week" => "nullable|numeric|in:-1,1,2,3,4", - "monthly_week_day" => "nullable|integer|in:1,2,3,4,5,6,7", - "end_times" => "nullable|numeric|max:50|exclude_unless:end_date_time,null", - "end_date_time" => "nullable|date|exclude_unless:end_times,null" + "type" => "nullable|integer|in:1,2,3", + "repeat_interval" => "nullable|integer", + "weekly_days" => "nullable|string", + "monthly_day" => "nullable|numeric|between:1,31", + "monthly_week" => "nullable|numeric|in:-1,1,2,3,4", + "monthly_week_day" => "nullable|integer|in:1,2,3,4,5,6,7", + "end_times" => "nullable|numeric|max:50|exclude_unless:end_date_time,null", + "end_date_time" => "nullable|date|exclude_unless:end_times,null", ]; }