phpBB API Documentation
Interface

phpbb\auth\provider\provider_interface

interface provider_interface

The interface authentication provider classes have to implement.

Methods

boolean|string init()

Checks whether the user is currently identified to the authentication provider.

login($username, $password)

Performs login.

array|null autologin()

Autologin function

acp()

This function is used to output any required fields in the authentication admin panel.

get_acp_template($new_config)

This function updates the template with variables related to the acp options with whatever configuraton values are passed to it as an array.

get_login_data()

Returns an array of data necessary to build custom elements on the login form.

logout(array $data, boolean $new_session)

Performs additional actions during logout.

boolean validate_session(array $user)

The session validation function checks whether the user is still logged into phpBB.

login_link_has_necessary_data($login_link_data)

Checks to see if $loginlinkdata contains all information except for the user_id of an account needed to successfully link an external account to a forum account.

link_account(array $link_data)

Links an external account to a phpBB account.

get_auth_link_data(int $user_id)

Returns an array of data necessary to build the ucpauthlink page

unlink_account(array $link_data)

Unlinks an external account from a phpBB account.

Details

at line 31
public boolean|string init()

Checks whether the user is currently identified to the authentication provider.

Called in acpboard while setting authentication plugins. Changing to an authentication provider will not be permitted in acpboard if there is an error.

Return Value

boolean|string False if the user is identified, otherwise an error message, or null if not implemented.

at line 50
public login($username, $password)

Performs login.

Parameters

$username
$password

at line 58
public array|null autologin()

Autologin function

Return Value

array|null containing the user row, empty if no auto login should take place, or null if not impletmented.

at line 67
public acp()

This function is used to output any required fields in the authentication admin panel.

It also defines any required configuration table fields.

at line 103
public get_acp_template($new_config)

This function updates the template with variables related to the acp options with whatever configuraton values are passed to it as an array.

It then returns the name of the acp file related to this authentication provider.

Parameters

$new_config

at line 124
public get_login_data()

Returns an array of data necessary to build custom elements on the login form.

at line 134
public logout(array $data, boolean $new_session)

Performs additional actions during logout.

Parameters

array $data An array corresponding to \phpbb\session::data
boolean $new_session True for a new session, false for no new session.

at line 144
public boolean validate_session(array $user)

The session validation function checks whether the user is still logged into phpBB.

Parameters

array $user

Return Value

boolean true if the given user is authenticated, false if the session should be closed, or null if not implemented.

Checks to see if $loginlinkdata contains all information except for the user_id of an account needed to successfully link an external account to a forum account.

Parameters

$login_link_data

Links an external account to a phpBB account.

Parameters

array $link_data

Returns an array of data necessary to build the ucpauthlink page

Parameters

int $user_id User ID for whom the data should be retrieved. defaults to 0, which is not a valid ID. The method should fall back to the current user's ID in this case.

Unlinks an external account from a phpBB account.

Parameters

array $link_data