tag !== 'CRED') { return; } $mand = \Civi::settings()->getMandatory('mailing_backend'); if ($mand !== NULL && !empty($mand['smtpPassword'])) { $e->log->warning('The settings override for smtpPassword cannot be changed automatically.'); } $exp = \Civi::settings()->getExplicit('mailing_backend'); if ($exp !== NULL && !empty($exp['smtpPassword'])) { $cryptoToken = \Civi::service('crypto.token'); $newValue = $cryptoToken->rekey($exp['smtpPassword'], 'CRED'); if ($newValue !== NULL) { $exp['smtpPassword'] = $newValue; \Civi::settings()->set('mailing_backend', $exp); $e->log->info('Updated mailing_backend.smtpPassword'); } } } }