User

10 events in this category

stormnodes:user:api:create

Callback parameters: string user uuid, string api key id.

onUserApiKeyCreated

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\UserEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(UserEvent::onUserApiKeyCreated(), function ($uuid, $id) {
        // Handle stormnodes:user:api:create
        // Parameters: string user uuid, string api key id.
    });
}

stormnodes:user:api:delete

Callback parameters: string user uuid, string api key id.

onUserApiKeyDeleted

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\UserEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(UserEvent::onUserApiKeyDeleted(), function ($uuid, $id) {
        // Handle stormnodes:user:api:delete
        // Parameters: string user uuid, string api key id.
    });
}

stormnodes:user:api:update

Callback parameters: string user uuid, string api key id.

onUserApiKeyUpdated

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\UserEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(UserEvent::onUserApiKeyUpdated(), function ($uuid, $id) {
        // Handle stormnodes:user:api:update
        // Parameters: string user uuid, string api key id.
    });
}

stormnodes:user:created

Callback parameters: array user data, int user id, array created by.

onUserCreated

Event Data Structure

This event receives the following data when emitted:

created_by
user
user_id

Emitted from:

backend/app/Controllers/Admin/PterodactylImporterController.phpbackend/app/Controllers/Admin/UsersController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\UserEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(UserEvent::onUserCreated(), function ($createdBy, $user, $userId) {
        // Handle stormnodes:user:created
        // Data keys: created_by, user, user_id
    });
}

stormnodes:user:deleted

Callback parameters: array user data, array deleted by.

onUserDeleted

Event Data Structure

This event receives the following data when emitted:

deleted_by
user

Emitted from:

backend/app/Controllers/Admin/UsersController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\UserEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(UserEvent::onUserDeleted(), function ($deletedBy, $user) {
        // Handle stormnodes:user:deleted
        // Data keys: deleted_by, user
    });
}

stormnodes:user:ssh:create

Callback parameters: string user uuid, string ssh key id.

onUserSshKeyCreated

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\UserEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(UserEvent::onUserSshKeyCreated(), function ($uuid, $id) {
        // Handle stormnodes:user:ssh:create
        // Parameters: string user uuid, string ssh key id.
    });
}

stormnodes:user:ssh:delete

Callback parameters: string user uuid, string ssh key id.

onUserSshKeyDeleted

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\UserEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(UserEvent::onUserSshKeyDeleted(), function ($uuid, $id) {
        // Handle stormnodes:user:ssh:delete
        // Parameters: string user uuid, string ssh key id.
    });
}

stormnodes:user:ssh:update

Callback parameters: string user uuid, string ssh key id.

onUserSshKeyUpdated

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\UserEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(UserEvent::onUserSshKeyUpdated(), function ($uuid, $id) {
        // Handle stormnodes:user:ssh:update
        // Parameters: string user uuid, string ssh key id.
    });
}

stormnodes:user:update

Callback parameters: string user uuid.

onUserUpdate

Event Data Structure

This event receives the following data when emitted:

user_uuid

Emitted from:

backend/app/Controllers/User/User/SessionController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\UserEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(UserEvent::onUserUpdate(), function ($userUuid) {
        // Handle stormnodes:user:update
        // Data keys: user_uuid
    });
}

stormnodes:user:updated

Callback parameters: array user data, array updated data, array updated by.

onUserUpdated

Event Data Structure

This event receives the following data when emitted:

updated_by
updated_data
user

Emitted from:

backend/app/Controllers/Admin/UsersController.php

Usage Example

use App\Plugins\PluginEvents;
use App\Plugins\Events\Events\UserEvent;

public static function processEvents(PluginEvents $evt): void
{
    $evt->on(UserEvent::onUserUpdated(), function ($updatedBy, $updatedData, $user) {
        // Handle stormnodes:user:updated
        // Data keys: updated_by, updated_data, user
    });
}