You are here

function backup_migrate_destination_nodesquirrel::get_user_pass in Backup and Migrate 7.2

Same name and namespace in other branches
  1. 8.3 includes/destinations.nodesquirrel.inc \backup_migrate_destination_nodesquirrel::get_user_pass()
  2. 6.3 includes/destinations.nodesquirrel.inc \backup_migrate_destination_nodesquirrel::get_user_pass()
  3. 6.2 includes/destinations.nodesquirrel.inc \backup_migrate_destination_nodesquirrel::get_user_pass()

Break the secret key into the public/private key (user/pass).

3 calls to backup_migrate_destination_nodesquirrel::get_user_pass()
backup_migrate_destination_nodesquirrel::save_file in includes/destinations.nodesquirrel.inc
Save to the NodeSquirrel destination.
backup_migrate_destination_nodesquirrel::_get_destination in includes/destinations.nodesquirrel.inc
Get the destination id or warn the user that it has not been set.
backup_migrate_destination_nodesquirrel::_get_private_key in includes/destinations.nodesquirrel.inc
Get the destination id or warn the user that it has not been set.

File

includes/destinations.nodesquirrel.inc, line 398
Functions to handle the NodeSquirrel backup destination.

Class

backup_migrate_destination_nodesquirrel
A destination for sending database backups to the NodeSquirel backup service.

Code

function get_user_pass() {
  $key = $this
    ->settings('secret_key');

  // The username is the first 32 chars.
  $user = substr($key, 0, 32);

  // The pass is the last 32 chars. There may be a separating character.
  $pass = substr($key, strlen($key) - 32);
  return array(
    $user,
    $pass,
  );
}