public static function MigrationBase::encrypt in Migrate 7.2
Encrypt an incoming value. Detects for existence of the Drupal 'Encrypt' module.
Parameters
string $value:
Return value
string The encrypted value.
1 call to MigrationBase::encrypt()
- MigrationBase::encryptArguments in includes/
base.inc - Make sure any arguments we want to be encrypted get encrypted.
File
- includes/
base.inc, line 1293 - Defines the base class for migration processes.
Class
- MigrationBase
- The base class for all objects representing distinct steps in a migration process. Most commonly these will be Migration objects which actually import data from a source into a Drupal destination, but by deriving classes directly from MigrationBase…
Code
public static function encrypt($value) {
if (module_exists('encrypt')) {
$value = encrypt($value);
}
else {
if (self::$showEncryptionWarning) {
MigrationBase::displayMessage(t('Encryption of secure migration information is not supported. Ensure the <a href="@encrypt">Encrypt module</a> is installed for this functionality.', array(
'@encrypt' => 'http://drupal.org/project/encrypt',
)), 'warning');
self::$showEncryptionWarning = FALSE;
}
}
return $value;
}