Reply to thread

In XF\Repository\Trophy::updateTrophiesForUser(..) there is a isset to skip already awarded trophies:

[code]

if (isset($userTrophies[$trophy->trophy_id]))

{

   continue;

}[/code]


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;

}[/code]

(Or directly returns an array with correct key names)


Back
Top Bottom