Fixed critical bug in assign_ticket.php that was causing JSON parsing errors:
- Fixed authentication check to use correct session variable ($_SESSION['user']['user_id'])
- Added missing database connection initialization
- Added proper connection cleanup (close)
- Updated all references to use correct session variable
- Changed require paths to use dirname(__DIR__) for consistency
This resolves the "Failed to execute 'json' on 'Response': Unexpected end of JSON input" error that occurred when assigning tickets.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>