This commit is contained in:
Dane Everitt 2017-12-30 20:25:04 -06:00
parent 10e2e6e379
commit 5efee34378
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 111 additions and 135 deletions

View file

@ -1,27 +1,14 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Observers;
use Pterodactyl\Events;
use Pterodactyl\Models\User;
use Pterodactyl\Services\Components\UuidService;
class UserObserver
{
protected $uuid;
public function __construct(UuidService $uuid)
{
$this->uuid = $uuid;
}
/**
* Listen to the User creating event.
*
@ -29,8 +16,6 @@ class UserObserver
*/
public function creating(User $user)
{
$user->uuid = $this->uuid->generate('users', 'uuid');
event(new Events\User\Creating($user));
}