src/UthandoUser/Service/UserService.php
public function attachEvents(): void
    {
        $this->getEventManager()->attach('post.add', [$this, 'sendEmail']);
        $this->getEventManager()->attach('pre.add', [$this, 'preAdd']);
        $this->getEventManager()->attach('pre.edit', [$this, 'preEdit']);
        $this->getEventManager()->attach('post.edit', [$this, 'postEdit']);
        $this->getEventManager()->attach('pre.save', [$this, 'preSave']);
    }
public function attachEvents(): void
    {
        $this->getEventManager()->attach('post.add', [$this, 'sendEmail']);
        $this->getEventManager()->attach('pre.add', [$this, 'preAdd']);
        $this->getEventManager()->attach('pre.edit', [$this, 'preEdit']);
        $this->getEventManager()->attach('post.edit', [$this, 'postEdit']);
        $this->getEventManager()->attach('pre.save', [$this, 'preSave']);
    }
protected $useCache = false;