mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-19 09:51:35 +02:00
Add User & AuthLog equals() method for comparison during tests
This commit is contained in:
@@ -232,4 +232,16 @@ class User extends Authenticatable implements HasLocalePreference, WebAuthnAuthe
|
||||
{
|
||||
return $this->hasMany(\App\Models\Group::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare 2 Users
|
||||
*/
|
||||
public function equals(self $other) : bool
|
||||
{
|
||||
return $this->name === $other->name &&
|
||||
$this->email === $other->email &&
|
||||
$this->oauth_id == $other->oauth_id &&
|
||||
$this->oauth_provider == $other->oauth_provider;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user