Plentymarkets interface documentation

Authentication

Contracts

ContactAuthenticationRepositoryContract

The ContactAuthenticationRepositoryContract is the interface for the authentication repository. This interface allows to authenticate users in the client (store) by email and password or by contact ID and password. The interface also provides a method for logging out users from the client (store).

Namespace

Plenty\Modules\Authentication\Contracts

Methods
public authenticateWithContactEmail($contactEmail, $password):void
Parameters

Name

Type

Description

$contactEmail

string

The email address of the contact of the user

$password

string

The password of the user

public authenticateWithContactId($contactId, $password):void
Parameters

Name

Type

Description

$contactId

int

The ID of the contact of the user

$password

string

The password of the user

public authenticateWithPlentyId($plentyId, $password):void
Parameters

Name

Type

Description

$plentyId

int

The PlentyId of the plenty system of the user

$password

string

The password of the user

public authenticateWithToken($token):void
Parameters

Name

Type

Description

$token

string

public logout():void
public logoutOtherDevices($password):void

Set new password to logged in contact and logout other devices with same contact.

Parameters

Name

Type

Description

$password

string

Events

AfterAccountAuthentication

The event is triggered after a user is authenticated in the client (store).

Namespace

Plenty\Modules\Authentication\Events

Methods
public isSuccessful():bool
public getAccountContact():Plenty\Modules\Account\Contact\Models\Contact
Return type: Contact

AfterAccountContactLogout

The event is triggered after a user is logged out from the client (store).

Namespace

Plenty\Modules\Authentication\Events

Models

User

The user authentication model

Namespace

Plenty\Modules\Authentication\Models

Properties
Name Type Description

id

int

The ID of the user

userId

int

The ID of the user

pwd

pwd_md5

email

string

emailHash

string

timezone

string

ticket

int

password

string

The password of the user

user

The login name of the user

username

string

The login name of the user

real_name

string

The full name of the user

lang

string

userClass

int

userRights

array

ipLimit

string

uiConfig

array

userType

string

The user type. ("admin", "backend", "api" deprecated)

permissions

array

pluginPermissions

array

visibilities

array

permissionKeys

array

roles

Collection

accessControl

array

daysLeftToChangePassword

int

isSupportUser

bool

oauthAccessTokensId

string

user_email

string

accountEmail

string

IsMigrated

bool

invitationStatus

string

loginType

string

blockLegacyLogin

bool

string

centralAuthUserId

Methods
public toArray()

Returns this model as an array.