//user model
public function init() {
$this->on(self::EVENT_NEW_USER, function ($event) {
$a = new Notifications();
$a->sendEmail('example', 'Новый пользователь', [$this->email => $this->username], ['login' => $this->username, 'password' => $this->password]);
});
}