You are here

function hosting_client_update_9 in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 client/hosting_client.install \hosting_client_update_9()
  2. 7.3 client/hosting_client.install \hosting_client_update_9()

Add uid 1 with client 1 to the hosting_client_user table if it wasn't there already. Was not happening on fresh installs via hook_install()

File

client/hosting_client.install, line 206
Install, update and uninstall for the clients module.

Code

function hosting_client_update_9() {
  $ret = array();
  $result = db_query("SELECT user, client FROM {hosting_client_user} WHERE user = 1 AND client = 1");
  if (!db_affected_rows($result)) {
    $ret[] = update_sql("INSERT INTO {hosting_client_user} (user, client) VALUES (1, 1)");
  }
  return $ret;
}