User events in Craft 3 How do I capture user events in Craft 3? I looked at the documentation but couldn't figure it out. I need to capture after user registration events and after user save events. 

Here is what I tried, I know it's not correct but I think I'm pretty close

Event::on(
    Users::class,
    Users::EVENT_AFTER_USER_SAVE,
    function (PluginEvent $event) {
        // do something
    }
);
There aren't specific User element save events in Craft 3, but you can listen to EVENT_AFTER_SAVE_ELEMENT and check if the element is a user like so:

Event::on(\craft\services\Elements::class, \craft\services\Elements::EVENT_AFTER_SAVE_ELEMENT, function(Event $event) {
    if ($event-&gt;element instanceof \craft\elements\User) {
        // Do your thing.
    }
});


For user activation, there's EVENT_AFTER_VERIFY_EMAIL:

Event::on(\craft\services\Users::class, \craft\services\Users::EVENT_AFTER_VERIFY_EMAIL, function(UserEvent $event) {
    $user = $event-&gt;user
});