function _deploy_encrypt_endpoints in Deploy - Content Staging 7.3
Helper function to encrypt existing endpoints username & password.
Return value
bool
3 calls to _deploy_encrypt_endpoints()
- deploy_install in ./
deploy.install - Implements hook_install().
- deploy_modules_enabled in ./
deploy.module - Implements hook_modules_enabled().
- deploy_update_7004 in ./
deploy.install - Encrypt existing endpoints username & password.
File
- ./
deploy.module, line 802 - Deploy module functions.
Code
function _deploy_encrypt_endpoints() {
foreach (deploy_endpoint_load_all() as $key => $value) {
$endpoint = deploy_endpoint_load($key);
if (!empty($endpoint->authenticator_config['username']) && !empty($endpoint->authenticator_config['password'])) {
$endpoint->authenticator_config['username'] = _deploy_encrypt($endpoint->authenticator_config['username']);
$endpoint->authenticator_config['password'] = _deploy_encrypt($endpoint->authenticator_config['password']);
ctools_export_crud_save('deploy_endpoints', $endpoint);
}
if (module_exists('encrypt')) {
// Remove default php encryption state.
if (_deploy_get_php_encryption_state()) {
variable_set('deploy_php_encryption_state', FALSE);
}
}
}
return TRUE;
}