diff --git a/sources/Users/User.uc b/sources/Users/User.uc index 4eae0ad..ccce20a 100644 --- a/sources/Users/User.uc +++ b/sources/Users/User.uc @@ -176,6 +176,22 @@ public final function bool SetPersistentData( return result; } +public function bool IsEqual(Object other) { + local User otherUser; + + if (id == none) return false; + otherUser = User(other); + if (otherUser == none) return false; + if (otherUser.id == none) return false; + + return id.IsEqual(otherUser.id); +} + +protected function int CalculateHashCode() { + // If `id` is `none`, then caller `User` shouldn't be used at all + return id.GetHashCode(); +} + defaultproperties { } \ No newline at end of file