EscolaLMS/Auth

View on GitHub
src/Providers/EventServiceProvider.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace EscolaLms\Auth\Providers;

use EscolaLms\Auth\Events\AccountDeleted;
use EscolaLms\Auth\Events\AccountRegistered;
use EscolaLms\Auth\Events\ForgotPassword;
use EscolaLms\Auth\Listeners\CreatePasswordResetToken;
use EscolaLms\Auth\Listeners\EmailAnonymisation;
use EscolaLms\Auth\Listeners\RemoveUserSocialAccounts;
use EscolaLms\Auth\Listeners\SendEmailVerificationNotification;
use EscolaLms\Auth\Listeners\MaskUserData;

class EventServiceProvider extends \Illuminate\Foundation\Support\Providers\EventServiceProvider
{
    protected $listen = [
        AccountRegistered::class => [
            SendEmailVerificationNotification::class,
        ],
        ForgotPassword::class => [
            CreatePasswordResetToken::class,
        ],
        AccountDeleted::class => [
            EmailAnonymisation::class,
            RemoveUserSocialAccounts::class,
            MaskUserData::class,
        ],
    ];

    /**
     * Register any events for your application.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();
    }
}