protected function TfaDataTrait::setUserData in Two-factor Authentication (TFA) 8
Store user specific information.
Parameters
string $module: The name of the module the data is associated with.
array $data: The value to store. Non-scalar values are serialized automatically.
int $uid: The user id.
\Drupal\user\UserDataInterface $user_data: User data object to store user specific information.
7 calls to TfaDataTrait::setUserData()
- TfaBasePlugin::storeAcceptedCode in src/
Plugin/ TfaBasePlugin.php - Store validated code to prevent replay attack.
- TfaDataTrait::tfaSaveTfaData in src/
TfaDataTrait.php - Save TFA data for an account.
- TfaRecoveryCode::storeCodes in src/
Plugin/ TfaValidation/ TfaRecoveryCode.php - Save recovery codes for current account.
- TfaTestValidationPluginSetupPlugin::submitSetupForm in tests/
modules/ tfa_test_plugins/ src/ Plugin/ TfaSetup/ TfaTestValidationPluginSetupPlugin.php - Submit the setup form.
- TfaTrustedBrowser::deleteTrusted in src/
Plugin/ TfaLogin/ TfaTrustedBrowser.php - Delete users trusted browser.
File
- src/
TfaDataTrait.php, line 24
Class
- TfaDataTrait
- Provides methods to save tfa user settings.
Namespace
Drupal\tfaCode
protected function setUserData($module, array $data, $uid, UserDataInterface $user_data) {
$user_data
->set($module, $uid, key($data), current($data));
}