1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Observers/UserObserver.php
2022-08-21 09:26:58 +10:00

79 lines
1.6 KiB
PHP

<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Observers;
use App\Models\User;
class UserObserver
{
/**
* Handle the app models user "created" event.
*
* @param User $user
* @return void
*/
public function created(User $user)
{
if(class_exists(\Modules\Admin\Jobs\Account\UserQuality::class))
\Modules\Admin\Jobs\Account\UserQuality::dispatch($user, $user->account->key);
}
/**
* Handle the app models user "updated" event.
*
* @param User $user
* @return void
*/
public function updated(User $user)
{
if(class_exists(\Modules\Admin\Jobs\Account\UserQuality::class))
\Modules\Admin\Jobs\Account\UserQuality::dispatch($user, $user->account->key);
}
/**
* Handle the app models user "deleted" event.
*
* @param User $user
* @return void
*/
public function deleted(User $user)
{
//
}
/**
* Handle the app models user "restored" event.
*
* @param User $user
* @return void
*/
public function restored(User $user)
{
//
}
/**
* Handle the app models user "force deleted" event.
*
* @param User $user
* @return void
*/
public function forceDeleted(User $user)
{
//
}
}