You are here

protected function TfaDataTrait::getUserData in Two-factor Authentication (TFA) 8

Returns data stored for the current validated user account.

Parameters

string $module: The name of the module the data is associated with.

string $key: The name of the data key.

int $uid: The user id.

\Drupal\user\UserDataInterface $user_data: User data object to store user specific information.

Return value

mixed|array The stored value is returned, or NULL if no value was found.

9 calls to TfaDataTrait::getUserData()
TfaBasePlugin::alreadyAcceptedCode in src/Plugin/TfaBasePlugin.php
Whether code has already been used.
TfaDataTrait::tfaGetTfaData in src/TfaDataTrait.php
Get TFA data for an account.
TfaRecoveryCode::getCodes in src/Plugin/TfaValidation/TfaRecoveryCode.php
Get unused recovery codes.
TfaTestValidationPluginSetupPlugin::getExpectedFieldData in tests/modules/tfa_test_plugins/src/Plugin/TfaSetup/TfaTestValidationPluginSetupPlugin.php
Get and decode the data expected during setup.
TfaTrustedBrowser::deleteTrusted in src/Plugin/TfaLogin/TfaTrustedBrowser.php
Delete users trusted browser.

... See full list

File

src/TfaDataTrait.php, line 48

Class

TfaDataTrait
Provides methods to save tfa user settings.

Namespace

Drupal\tfa

Code

protected function getUserData($module, $key, $uid, UserDataInterface $user_data) {
  return $user_data
    ->get($module, $uid, $key);
}