fix user medals

This commit is contained in:
xiaomlove
2024-08-28 04:42:51 +08:00
parent c7c85422f1
commit 729e5a25cb
2 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<?php <?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.13'); defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.13');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-08-09'); defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-08-28');
defined('IN_TRACKER') || define('IN_TRACKER', false); defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP"); defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org"); defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
+2 -5
View File
@@ -53,12 +53,9 @@ $table = <<<TABLE
</thead> </thead>
TABLE; TABLE;
$now = now(); $now = now();
$user = \App\Models\User::query()->findOrFail($CURUSER['id']);
$table .= '<tbody>'; $table .= '<tbody>';
$userMedals = \App\Models\UserMedal::query()->where('uid', $CURUSER['id']) $userMedals = $user->valid_medals->keyBy('id');
->orderBy('id', 'desc')
->get()
->keyBy('medal_id')
;
foreach ($rows as $row) { foreach ($rows as $row) {
$buyDisabled = $giftDisabled = ' disabled'; $buyDisabled = $giftDisabled = ' disabled';
$buyClass = $giftClass = ''; $buyClass = $giftClass = '';