How to display the current and parent category in WordPress
Need to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
A PHP application that logs people in with a password, for a company or public body in Paris, gets judged against one CNIL text more than any other: deliberation 2022-100 on passwords. I am Mariusz Szatkowski, a developer based in Gdynia who has written PHP remotely and in writing since 2006. I can design the screens, or work from the design you already have. The controller decides which case of the recommendation fits its processing, and the login, storage and reset code then follow that choice.

The Pont des Arts footbridge over the Seine. Picture by Benh LIEU SONG, released under CC BY-SA 3.0, available on Wikimedia Commons.
Deliberation 2022-100 of 21 July 2022 adopts a recommendation on passwords and other shared secrets, and repeals deliberation 2017-012 of 19 January 2017. The text is published as a PDF on cnil.fr. It covers any knowledge factor, so passphrases and unlock codes count, and cryptographic keys do not (paragraph 8).
Paragraph 5 sets its legal weight. The provisions are not normative, but they describe the state of the art that a controller should meet at a minimum to satisfy article 32 GDPR when it protects processing with passwords. Paragraph 6 allows other measures if the controller can show they give at least an equivalent level of security, and names two-factor authentication and electronic certificates as stronger than a password alone.
Two paragraphs speak to the people who build the software. Paragraph 12 says password management handed to a processor falls under article 28 GDPR, with roles, required security level and objectives written down. Paragraph 13 says plain software publishers are outside data protection law, but the documentation of software that handles passwords should describe in detail how passwords are generated, stored and transmitted, so users of the software can comply. For a custom PHP application, that documentation is part of the delivery.
Paragraph 9 sets the general floor: length and complexity equivalent to 80 bits of entropy when no other measure is in place. Paragraphs 41 to 47 describe three cases, and the controller picks one by use case and audience (paragraph 38). The entropy values are lower limits, and paragraph 40 says risk can push them higher.
| Case | Minimum entropy | Examples given by the CNIL |
|---|---|---|
| 1. Password alone | 80 bits | 12 characters with upper and lower case, digits and special characters from a list of at least 37; or 14 characters with upper and lower case and digits; or a passphrase of at least 7 French words |
| 2. Password with account access restriction | 50 bits | 8 characters using 3 of 4 categories, special characters from a set of at least 11; or a passphrase of at least 5 French words; or at least 16 digits |
| 3. Unlock code on hardware held by the person | 13 bits | at least 4 decimal digits, with the device blocked after at most 3 consecutive failures |
Case 3 only covers hardware the person holds: smart cards and devices with a certificate or a key pair unlocked by the code, or another mechanism with the same level of security (paragraph 46). A web login for staff or customers is normally case 1 or case 2. Choosing case 2 for its 8-character floor makes the throttling code mandatory.
Paragraph 37 adds that commonly used passwords should not be accepted, and users must be told that the most common ones are refused. Paragraph 36 asks for a clear message on refusal that restates the policy and explains why the password failed. Paragraph 30 says users must know the policy before they choose, including minimum and maximum length where users might not respect them naturally.
Paragraph 43 gives the access restriction mechanisms for case 2. The application uses one or more of these:
Paragraph 44 asks the controller to weigh the risk of denial of service. A hard lock after 10 failures lets anyone who knows an email address lock its owner out, which is one reason to prefer the delay. A minimal version of the first option, counted per account over a rolling 24 hours:
<?php
// CNIL deliberation 2022-100, paragraph 43, first option.
// Returns the wait in seconds, or null when the 24-hour cap is reached.
function cnilLoginDelay(int $failuresInLast24Hours): ?int
{
if ($failuresInLast24Hours >= 25) {
return null; // no further attempts until the oldest failure is 24 hours old
}
if ($failuresInLast24Hours < 3) {
return 0;
}
return min(2 ** ($failuresInLast24Hours + 1), 3600); // 16 s, 32 s, 64 s after five failures, capped at one hour
}The failure count lives in the database next to the account, with a timestamp per failure, so the rolling window is a simple query. A delay for the same source address can sit next to the per-account count. Paragraph 28 says the message after a failed login should state the failure without information that helps an attacker, so the response for an unknown email and for a wrong password is the same.
Paragraph 48 says a password is never stored in clear. When kept for verification, it is transformed by a specialised, non-reversible and secure cryptographic function, using a public algorithm considered strong, with a salt and cost parameters for time and memory. Paragraph 49 asks for a random salt of at least 128 bits, generated per user and kept in the same database, and for regular updates of salt size, algorithms and parameters as risks change.
The php.net manual describes password_hash in terms that map onto those paragraphs:
password_verify needs no separate salt storage.PASSWORD_BCRYPT takes a cost option. Since PHP 8.4.0 the default cost is 12, raised from 10.PASSWORD_ARGON2ID takes memory_cost, time_cost and threads, and is only available if PHP was compiled with Argon2 support.PASSWORD_DEFAULT is currently an alias for bcrypt and may change in newer releases, so the manual recommends a column 255 bytes wide.The regular update in paragraph 49 has a PHP answer too. The manual’s example for password_needs_rehash checks the stored hash after a successful password_verify and, if the algorithm or options changed, hashes the password again and replaces the stored value. Raising the cost or moving to Argon2id then happens at each user’s next login, without a reset campaign.
Paragraph 31 asks for a maximum length on internet-facing password fields, to stop denial of service through very long input. The maximum should in principle be at least 50 characters for cases 1 and 2, and can be a few hundred.
The php.net manual warns that with PASSWORD_BCRYPT the password is truncated to a maximum of 72 bytes. A 7-word French passphrase, which is case 1 example 3, can approach that limit, and accented letters take two bytes each in UTF-8. Characters past byte 72 then add nothing. Two ways to handle it, and the controller picks:
PASSWORD_ARGON2ID where the server’s PHP build supports it, and set the field maximum to a few hundred characters as paragraph 31 allows.Paragraph 32 forbids anything that blocks pasting into password fields, at creation, change or login, to encourage password managers and help accessibility. Paragraph 27 asks that typed characters are hidden by default, which an input of type password does. Paragraph 24 says passwords must never appear in URLs, hashed or not, so login forms post their data and never send it in a query string.
Paragraphs 52 to 58 cover changes and resets. Users must be able to change their own password (paragraph 52). For a reset requested by the user:
In PHP the link token comes from random_bytes, which the manual describes as cryptographically secure and suitable for long-term secrets. The database keeps a hash of the token with its expiry time and a used flag. When the link is opened, the comparison uses hash_equals, which the manual describes as a timing-attack-safe string comparison, with the user-supplied value as the second argument. Generating a new token deletes any earlier one for that account.
Paragraph 54 changes an old habit: controllers should no longer force periodic password changes on all users. Privileged accounts, such as administration accounts, still need a periodic change at an interval set by risk. Paragraphs 59 to 61 cover compromise: tell the person without delay, let them change the password at once, and force a change at the next login when a breach of their password is suspected.
Paragraph 64 says authentication activity and changes to secrets, by the user or third parties, should be logged following the CNIL recommendations on logging. Passwords and unrecognised identifiers must not appear in the logs. The second half matters in PHP: a user who types the password into the email field produces an “unknown identifier” that is in fact a password. The application logs the event, the account id when known, the time and the source address, and never the submitted username string from a failed attempt.
password_hash, a 255-byte column and password_needs_rehash at login.I am not a lawyer. Which case of the recommendation your processing falls under, whether your data needs stronger measures such as multi-factor authentication (paragraph 11 names health data, large-scale processing and administrator accounts), and how your processor contracts read are decisions for you, your DPO and your adviser. This page follows the deliberation text on cnil.fr and the php.net manual, and does not cover sector rules that may set a higher authentication level.
If your Paris application signs users in with passwords, send me the code location or scope, the user groups, the hosting and your deadline through the contact form. My first written estimate for the login work costs you nothing. Which CNIL case applies, and whether your data calls for more than a password, is for you and your DPO to decide.
Examples of my work.
scalac.io is an international platform founded in 2014 to meet the challenges associated with big data management and business operations scaling, specializing in Scala, distributed systems, and cryptography solutions.
Sprint.pl is a website created for Sprint S.A., an Olsztyn-based company operating since 1988 as a systems integrator and provider of advanced software. The ...
VECTOR Technologies is an international technology company specialising in the development and production of telecommunications systems for providers providers across Europe.
Describe your project by e-mail. I reply within 24 hours.
Describe your projectNeed to show the category hierarchy in your theme? Learn how to get the current category and its parent using get_the_category() and get_category_parents().
Need to get the URL of the first image or link in an article? Prefer DOMDocument over regex. Ready-made WordPress PHP for developers.
On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.
Custom WordPress engineering and architecture.
Scalable headless, ERP, and AI architecture for enterprise.
Stores, checkout flow, and sales logic.
Stability, updates, and post-launch support.
What the monthly care fee covers and what changes it.
Business process automation around WordPress and company systems.
Headless WordPress, Sanity, Strapi, and Contentful with Astro or Next.js.
Astro, MDX, edge delivery, and Core Web Vitals measured on real traffic.

How to start as a WordPress developer in 2026. Local environment, theme and plugin development, REST API and headless paths, security and Core Web Vitals. A practitioner playbook that does not waste your first month.

WordPress 7.0 with AI Client against Astro 7 with the Rust compiler and Vite 8. Speed, cost, SEO and security compared, plus the real bill for my own Astro 6 to 7 migration.

A detailed comparison table of EmDash CMS and WordPress across architecture, security, plugins, AI features, content model, hosting, and ecosystem maturity.