IntegrationUser
in package
Represents a integration user.
Tags
Table of Contents
Properties
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
$_data
private
IntegrationUserData
$_data
$_db
private
DB
$_db
$_integration
private
IntegrationBase
$_integration
$_user
private
User
$_user
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
data()
Get the integration user data.
public
data() : IntegrationUserData
Return values
IntegrationUserData —This integration user data.
exists()
Does this integration user exist?
public
exists() : bool
Return values
bool —Whether the user exists (has data) or not.
getIntegration()
Get the integration.
public
getIntegration() : IntegrationBase
Return values
IntegrationBase —Integration type for this user
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
verifyIntegration()
Verify user integration.
public
verifyIntegration() : void