Documentation

Drupal
in package
implements AuthxInterface

Table of Contents

Interfaces

AuthxInterface
Interface AuthxInterface

Methods

checkPassword()  : int|string|null
Determine if the password is correct for the user.
getCurrentUserId()  : int|string|null
Determine which (if any) user is currently logged in.
loginSession()  : mixed
Set the active user the in the CMS, binding the user ID durably to the session.
loginStateless()  : mixed
Set the active user the in the CMS -- but do *not* start a session.
logoutSession()  : mixed
Close an open session.

Methods

checkPassword()

Determine if the password is correct for the user.

public checkPassword(string $username, string $password) : int|string|null
Parameters
$username : string

The symbolic username known to the user.

$password : string

The plaintext secret which identifies this user.

Tags
inheritDoc
Return values
int|string|null

If the password is correct, this returns the internal user ID. If the password is incorrect (or if passwords are not supported), it returns NULL.

getCurrentUserId()

Determine which (if any) user is currently logged in.

public getCurrentUserId() : int|string|null
Tags
inheritDoc
Return values
int|string|null

The UF's internal user ID for the active user. NULL indicates anonymous (not logged into CMS).

loginSession()

Set the active user the in the CMS, binding the user ID durably to the session.

public loginSession(mixed $userId) : mixed
Parameters
$userId : mixed

The UF's internal user ID.

Tags
inheritDoc

loginStateless()

Set the active user the in the CMS -- but do *not* start a session.

public loginStateless(mixed $userId) : mixed
Parameters
$userId : mixed

The UF's internal user ID.

Tags
inheritDoc

logoutSession()

Close an open session.

public logoutSession() : mixed
Tags
inheritDoc

        
On this page

Search results