You are here

function masquerade_update_5000 in Masquerade 6

Same name and namespace in other branches
  1. 5 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 90
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();
}