add badge print role
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Successful in 1m20s

This commit is contained in:
root
2026-08-30 21:50:32 -04:00
parent e1fa1ded64
commit 8d83cf84ab
2 changed files with 51 additions and 12 deletions
@@ -122,6 +122,10 @@ class BadgesController extends PrintablesBaseController
$roleResolved = $postedRole !== null ? $postedRole : $resolveRole($info);
$roleResolved = $formatRole((string)$roleResolved);
$info['role_resolved'] = $roleResolved;
if ($postedRole !== null && trim((string)$postedRole) !== '') {
$info['roles_raw'] = $roleResolved;
$info['role_name_raw'] = $roleResolved;
}
// Prefer posted class name if provided (keeps what the user saw)
if (!empty($classesMap[$userId])) {