Trophy rebuild not skipping already awarded trophies

Affected version
2.1.1

AlessioDP

Member
In XF\Repository\Trophy::updateTrophiesForUser(..) there is a isset to skip already awarded trophies:
Code:
if (isset($userTrophies[$trophy->trophy_id]))
{
   continue;
}
That will return false every time, because the format of the $userTrophies returns an array with key as USER_ID-TROPHY_ID, so to works it should be:
Code:
if (isset($userTrophies[$user->user_id . '-' . $trophy->trophy_id]))
{
   continue;
}
(Or directly returns an array with correct key names)
 
Top