Skip to content

Commit

Permalink
Correct bug on User UpdatePassword
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhall17 committed Sep 2, 2020
1 parent e96d63b commit 160d0c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace MacsiDigital\Zoom;

use MacsiDigital\Zoom\Exceptions\ValidationException;
use MacsiDigital\Zoom\Support\Model;
use MacsiDigital\Zoom\Exceptions\FileTooLargeException;

Expand Down Expand Up @@ -118,10 +119,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');
}
}

Expand Down

0 comments on commit 160d0c0

Please sign in to comment.