Skip to content

Commit

Permalink
Fix missing email failure and phone users being marked as skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed Oct 31, 2024
1 parent 6379fd1 commit 4d16791
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Migration/Destinations/Appwrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -1073,9 +1073,9 @@ public function importAuthResource(Resource $resource): Resource
$this->users->create(
$resource->getId(),
$resource->getEmail(),
$resource->getPhone(),
null,
$resource->getUsername()
null,
null
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/Migration/Resources/Auth/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class User extends Resource
*/
public function __construct(
string $id,
private readonly string $email = '',
private readonly string $username = '',
private readonly ?string $email = '',
private readonly ?string $username = '',
private readonly ?Hash $passwordHash = null,
private readonly ?string $phone = null,
private readonly array $labels = [],
Expand Down Expand Up @@ -88,7 +88,7 @@ public static function getName(): string
/**
* Get Email
*/
public function getEmail(): string
public function getEmail(): ?string
{
return $this->email;
}
Expand Down

0 comments on commit 4d16791

Please sign in to comment.