Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Models/UserModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public function addToDefaultGroup(User $user): void

public function fake(Generator &$faker): User
{
return new User([
return new $this->returnType([
'username' => $faker->unique()->userName(),
'active' => true,
]);
Expand Down Expand Up @@ -226,7 +226,7 @@ public function findByCredentials(array $credentials): ?User
$password_hash = $data['password_hash'];
unset($data['password_hash']);

$user = new User($data);
$user = new $this->returnType($data);
$user->email = $email;
$user->password_hash = $password_hash;
$user->syncOriginal();
Expand Down