OpenRA / openrauseraccounts

Connect phpBB forum accounts to OpenRA installations
https://forum.openra.net/ucp.php?i=232
GNU General Public License v2.0
3 stars 3 forks source link

Validate badge_order after new badges are inserted #31

Closed ghost closed 6 years ago

ghost commented 6 years ago

Having badge_order = null until the Order badges page is loaded is not good and causes the counter for Bade used by users: to fail as it only considers order values <= 5 / the setting for max badges.

ghost commented 6 years ago

The validation function is now available in the core class and called after new badges are added to the openra_user_badges table when the user submits the selected badges in the Select badges UCP tab. Function is called again when the Order badges tab is loaded which is only a fallback in case the admin deleted badges that have been in the openra_user_badges (and were deleted too from there).