1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00

Update user observer to dispatch a job

This commit is contained in:
David Bomba 2022-08-21 09:26:58 +10:00
parent acb756b229
commit 5e8bcc04dc

View File

@ -23,8 +23,10 @@ class UserObserver
*/
public function created(User $user)
{
if(class_exists(\Modules\Admin\Jobs\Account\UserQuality::class))
(new \Modules\Admin\Jobs\Account\UserQuality($user, $user->account->key))->run();
if(class_exists(\Modules\Admin\Jobs\Account\UserQuality::class))
\Modules\Admin\Jobs\Account\UserQuality::dispatch($user, $user->account->key);
}
/**
@ -36,8 +38,9 @@ class UserObserver
public function updated(User $user)
{
if(class_exists(\Modules\Admin\Jobs\Account\UserQuality::class))
(new \Modules\Admin\Jobs\Account\UserQuality($user, $user->account->key))->run();
if(class_exists(\Modules\Admin\Jobs\Account\UserQuality::class))
\Modules\Admin\Jobs\Account\UserQuality::dispatch($user, $user->account->key);
}
/**