I'm trying to listen for an event when users create new accounts. I have the following code in my init() function in my main plugin class:

craft()->on('users.activateUser', function(Event $event) {
    error_log("user activated");

This isn't firing when new users register on the site and I'm wondering if this has to do with the "Verify email addresses?" users setting. I'm not requiring users to verify their email addresses. Does that setting have to be checked in order to trigger that event? If so, is there a different event to listen for?

1 Answer 1


Use the onSaveUser event instead but check for the flag inside that event called isNewUser


  • Awesome, thanks for the tip. That worked perfectly.
    – Coppa
    Jun 24, 2014 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.