public function clients_credentials_storage_variable::credentialsSave in Web Service Clients 7.3
Save credentials.
Parameters
$connection: The connection to save credentials for. These should be present in the $connection->credentials array, where the form submit process will have placed them.
File
- plugins/
clients_credentials_storage/ variables.inc, line 60
Class
- clients_credentials_storage_variable
- Plugin handler class.
Code
public function credentialsSave($connection) {
// Get the list of properties which are credentials.
$credentials = array();
$credentials_properties = $connection
->credentialsProperties();
// Build an array of credentials to save.
foreach ($credentials_properties as $property_name) {
$credentials[$property_name] = $connection->credentials[$property_name];
}
variable_set($this
->variableName($connection), $credentials);
}