You are here

function masquerade_update_5000 in Masquerade 5

Same name and namespace in other branches
  1. 6 masquerade.install \masquerade_update_5000()

Implementation of hook_update_N().

Update for http://drupal.org/node/281468 Adding support for multiple quick links in the Masquerade block.

File

./masquerade.install, line 61
masquerade.install

Code

function masquerade_update_5000() {

  // If test user was previously configured, add that as the first quick switch user.
  $masquerade_test_user = variable_get('masquerade_test_user', '');
  $masquerade_test_uid = db_result(db_query("SELECT uid FROM {users} WHERE name = '%s'", $masquerade_test_user));
  if ($masquerade_test_uid) {
    variable_set('masquerade_quick_switches', array(
      $masquerade_test_uid => $masquerade_test_uid,
    ));
  }
  return array();
}