AlessioDP
Member
- Affected version
- 2.1.1
In XF\Repository\Trophy::updateTrophiesForUser(..) there is a isset to skip already awarded trophies:
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:
(Or directly returns an array with correct key names)
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;
}