SShortSingh.
Back to feed

How to Run Concurrent Multi-User Sessions in the Same Browser with Yii2

0
·1 views

Modern Yii2-based web apps like e-commerce platforms often require separate admin and merchant accounts to be logged in simultaneously within the same browser. By default, Yii2 uses a single session key to track authenticated users, causing one login to overwrite another and leading to broken authorization or unexpected logouts. A proposed solution called Zero Code Mutation Architecture addresses this by subclassing core Yii2 components to enable real-time dynamic context switching based on the request URL. The approach assigns distinct session keys, identity cookies, and flash message namespaces to each application context — admin or merchant — without altering core framework files. This allows both portals to operate independently in separate browser tabs without session collisions.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

How to Properly Benchmark a Unified LLM API for Invoice Data Extraction

Developers building Node.js invoice-extraction backends that route requests through a unified LLM API — supporting OpenAI, Claude, or Gemini via a single credential — must benchmark the full pipeline against both field-level quality thresholds and latency budgets before relying on it in production. A curated acceptance corpus of around 20 labeled documents, paired with reviewed expected outputs, can expose critical extraction failures that aggregate scores alone would obscure. Exact fields like invoice numbers and currency codes require normalized value comparisons, while latency should be measured at a percentile level rather than just an average to avoid masking slow outliers that could bottleneck support queues. Benchmark runs must use identical inputs, schema instructions, and retry policies across all candidate paths, and evaluators must distinguish between syntactically valid JSON and genuinely correct field extraction. The key takeaway is that a unified gateway's convenience — one API key and a clean interface — does not substitute for rigorous, representative testing against the actual documents a team processes.

0
ProgrammingDEV Community ·

How to Recover a Bricked Framework Laptop Using Built-In Tools

A Framework laptop that won't boot is often caused by BIOS corruption, a failed update, or misconfigured settings rather than permanent hardware damage. Framework laptops include a built-in recovery mechanism that can be triggered by holding a pinhole button on the device's underside while plugging in the charger, allowing the system to reflash the BIOS from a backup chip. If the built-in recovery fails, users can manually flash the BIOS by creating a bootable FAT32 USB drive using BIOS files and a flashing tool available on Framework's official support site. When software recovery methods are exhausted, reseating the RAM and storage modules is recommended, as loose components can also prevent the laptop from booting. Framework's user-serviceable design and support team provide additional options for diagnosing and resolving persistent hardware issues.

0
ProgrammingDEV Community ·

Workday's Job API Returns Empty Results for Limits Above 20, No Error Given

A developer discovered that Workday's public job search API silently returns an empty array when the request limit is set above 20, despite responding with a 200 OK status and no error message. This silent failure can cause scrapers or job aggregators to incorrectly conclude a company has no open roles. The real maximum limit is 20 results per request, requiring developers to paginate manually and cap offsets to avoid infinite loops on large tenants. Additional undocumented quirks were found across other applicant tracking systems, including Ashby's compensation data being hidden behind an opt-in parameter and company names being absent or underivable from several APIs. The author notes that distinguishing between a genuinely empty result and a silent API failure requires explicit logging and careful validation of responses.

How to Run Concurrent Multi-User Sessions in the Same Browser with Yii2 · ShortSingh