passbolt/passbolt_api · warning · StopException
Password expiry is not activated.
Error message
Password expiry is not activated.
What it means
StopException thrown by notifyResourceOwners when the password expiry feature is disabled in organization settings. Notification of resource owners of expired resources only runs when the feature is activated.
Solutions
- Enable password expiry via POST /password-expiry/settings with automaticExpiryOnDeleteOnExpired activated in the payload.
- Verify current settings via GET /password-expiry/settings.
- Guard the job/command to skip execution when the feature is disabled.
- If you believe it is enabled, check the setting row stored in organization_settings for the plugin scope.
Example fix
// before (disabled)
{}
// after
{"automatic_expiry": {"automatic_expiry_on_delete_on_expired": true, "automatic_expiry_period": "90d"}} Defensive patterns
Strategy: validation
Validate before calling
$settings = $settingsService->get(); if (!$settings->isPasswordExpiryFeatureEnabled()) { return null; // skip notification } Try / catch
try { $query = $service->notifyResourceOwners(); } catch (StopException $e) { // feature disabled; skip gracefully } Prevention
- Gate cron jobs/commands on the password expiry feature flag.
- Verify the feature is enabled via GET /password-expiry/settings before scheduling notifications.
- Document that disabling the feature stops owner notifications.
When it happens
Trigger: Executing the expired-resources owner notification query (e.g. via the password expiry notification command) while PasswordExpirySettingsDto::isPasswordExpiryFeatureEnabled() returns false.
Common situations: Running the password-expiry notify cron/job on an instance where admins never enabled the feature, or after an admin disabled it in the organization settings.
Related errors
- Healthcheck security index endpoint disabled.
- Password expiry email notifications are disabled.
- Password expiry is not activated.
- V5 metadata format is not enabled.
- Additional resource types are not enabled on this server.
AI-assisted analysis of passbolt/passbolt_api@31c1bbc10f (2026-09-17).
Data as JSON: /api/errors/14d0eac1c1e12560.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/PassboltCe/PasswordExpiry/src/Service/Resources/PasswordExpiryGetOwnersOfExpiredResourcesService.php:61
* @param \Passbolt\PasswordExpiry\Service\Settings\PasswordExpiryGetSettingsServiceInterface $settingsService Get password expiry service
*/
public function __construct(PasswordExpiryGetSettingsServiceInterface $settingsService)
{
$this->settingsService = $settingsService;
}
/**
* Notify the users about their passwords expiring today or in N days
*
* @return \Cake\ORM\Query
* @throws \Cake\Console\Exception\StopException if the settings are not enabled
*/
public function notifyResourceOwners(): Query
{
$settings = $this->settingsService->get();
if (!$settings->isPasswordExpiryFeatureEnabled()) {
throw new StopException(__('Password expiry is not activated.'));
}
$owners = $this->getOwnersToNotify();
$owners
->find('locale')
->contain(['Profiles' => AvatarsTable::addContainAvatar()]);
$this->dispatchEvent(
self::NOTIFY_ABOUT_EXPIRED_RESOURCES_EVENT_NAME,
[
'users' => $owners,
],
$this
);
return $owners;
}
View on GitHub (pinned to 31c1bbc10f)