Documentation

IntegrationUser

Represents a integration user.

Tags
author

Partydragen

version
2.0.0-pr13
license

MIT

Table of Contents

Properties

$_data  : IntegrationUserData
$_db  : DB
$_integration  : IntegrationBase
$_user  : User

Methods

__construct()  : mixed
data()  : IntegrationUserData
Get the integration user data.
exists()  : bool
Does this integration user exist?
getIntegration()  : IntegrationBase
Get the integration.
getUser()  : User
Get the NamelessMC User that belong to this integration user.
isVerified()  : bool
Get if this integration user is verified or not.
linkIntegration()  : void
Save a new user linked to a specific integration.
unlinkIntegration()  : void
Delete integration user data.
update()  : void
Update integration user data in the database.
verifyIntegration()  : void
Verify user integration.

Properties

Methods

__construct()

public __construct(IntegrationBase $integration[, string $value = null ][, string $field = 'id' ][, mixed $query_data = null ]) : mixed
Parameters
$integration : IntegrationBase
$value : string = null
$field : string = 'id'
$query_data : mixed = null

exists()

Does this integration user exist?

public exists() : bool
Return values
bool

Whether the user exists (has data) or not.

getUser()

Get the NamelessMC User that belong to this integration user.

public getUser() : User
Return values
User

NamelessMC User that belong to this integration user

isVerified()

Get if this integration user is verified or not.

public isVerified() : bool
Return values
bool

Whether this integration user has been verified.

linkIntegration()

Save a new user linked to a specific integration.

public linkIntegration(User $user, string|null $identifier, string|null $username[, bool $verified = false ][, string|null $code = null ]) : void
Parameters
$user : User

The user to link

$identifier : string|null

The id of the integration account

$username : string|null

The username of the integration account

$verified : bool = false

Verified the ownership of the integration account

$code : string|null = null

(optional) The verification code to verify the ownership

unlinkIntegration()

Delete integration user data.

public unlinkIntegration() : void

update()

Update integration user data in the database.

public update([array<string|int, mixed> $fields = [] ]) : void
Parameters
$fields : array<string|int, mixed> = []

Column names and values to update.

Tags
throws
Exception

verifyIntegration()

Verify user integration.

public verifyIntegration() : void

        
On this page

Search results