Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AtomCoder's avatar

Disable Observer Event Temporarily?

Hi,

I have a UserObserver in my application and I'm trying to temporarily disable the updating event in the observer when the created event is triggered.

On user creation the observer is currently triggering created & updating events (possibly all other events too)

Is there a way to temporarily disable individual or all other events when the created event is triggered ?

0 likes
2 replies
AtomCoder's avatar

Ah, I was updating a field in the user table within the created event, that was obviously triggering the updating event. I've now changed that.

Thanks for your reply!

Please or to participate in this conversation.