Bypass email confirmation

Created on 2 June 2020, over 4 years ago
Updated 3 August 2022, over 2 years ago

I'd like to be able to bypass the confirmation process when a user is saved based on some custom rules.
I've written a patch which adds an extra check in email_confirmer_user_user_presave()
If the entity has the property bypassEmailConfirmer set to true, then the email confirmation process is skipped.

$user->bypassEmailConfirmer = true;
$user->save();

I'm not sure if this way of setting custom property is the right way to do. If anyone has a better idea ?

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇫🇷France DamienGR

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France DamienGR

    You are right. It is deprecated in PHP 8.2 and will result in a fatal error in PHP 9, except for classes that declare __set and __get methods, which is the case for all content entity classes

Production build 0.71.5 2024