XF 1.5 Trophy Points Issue

psx

Active member
Hi

I have reset a member Trophy Points to 0 in the admin panel, but now it doesn't move up or count.

How can I make it count again?
 
Reseting the trophy count from the admin panel, should not pose a problem for receiving trophy points in the future. Maybe that user is not getting any trophy points and that is why it is not doing anything.

It might be worth to run Update User Trophies cron. If that user has received trophies, rebuilding the trophy cache can solve the issue.
 
Is there a way to do it just for a specific user?

This should do it:

Code:
DELETE
FROM xf_user_trophy
WHERE user_id = 123;

UPDATE xf_user AS u
SET u.trophy_points = (
	SELECT SUM(t.trophy_points)
	FROM xf_user_trophy AS ut
	LEFT JOIN xf_trophy AS t ON (t.trophy_id = ut.trophy_id)
	WHERE ut.user_id = u.user_id
)
WHERE u.user_id = 123;

Replace 123 with the user id number.

The rest of the instructions are the same as that link I posted.
 
Top Bottom