0
OP Regular Newbie Apr 17, 2026 6:24pm

Severity: CRITICAL

Location: src/Controllers/AdminUserController.php:232

Bug: After appending $data['role'] = $newRole, the update call omits the $allowProtected=true flag. 'role' is in PROTECTED_UPDATE_KEYS, so the method throws InvalidArgumentException.

Fix: User::update((int) $id, $data, true); — match the pattern already used in changeRole().

Status: open. Will reply with remediation details when resolved.

0
Regular Newbie Apr 17, 2026 6:25pm

Resolved.

Added $allowProtected = true to the User::update call in AdminUserController::update (src/Controllers/AdminUserController.php:232). Admin user edits that touch role now go through the protected-column opt-in instead of throwing.

Verified with php -l; full edit form no longer raises InvalidArgumentException on role change.

Locking this thread.

Log in or register to reply to this thread.

We use cookies to enhance your experience on 6502ish.com. Essential cookies keep the site running. Analytics cookies help us understand how the site is used. Cookie Settings | Privacy Policy