From 7b1c077f5cd189324f3a6017de291b116ed2413e Mon Sep 17 00:00:00 2001 From: Shawn Kwang Date: Mon, 2 Apr 2018 12:56:19 -0500 Subject: [PATCH] Drupal: Changed create account to set show_hosts to false. Also added help text to Privacy form. https://dev.gridrepublic.org/browse/DBOINCP-430 --- drupal/sites/default/boinc/modules/boincuser/boincuser.module | 4 ++++ .../boinc/modules/boincwork/includes/boincwork.forms.inc | 1 + 2 files changed, 5 insertions(+) diff --git a/drupal/sites/default/boinc/modules/boincuser/boincuser.module b/drupal/sites/default/boinc/modules/boincuser/boincuser.module index 3891a06585..e86f5cbfe7 100644 --- a/drupal/sites/default/boinc/modules/boincuser/boincuser.module +++ b/drupal/sites/default/boinc/modules/boincuser/boincuser.module @@ -1450,6 +1450,10 @@ function boincuser_create_account() { if (!$reference) { xml_error(-1, 'error connecting BOINC account to Drupal'); } + // Disable show_hosts flag, set to TRUE by default + db_set_active('boinc_rw'); + db_query("UPDATE {user} SET show_hosts=0 WHERE id='%d'", $boinc_user->id); + db_set_active('default'); } else { // Delete the drupal user just created. diff --git a/drupal/sites/default/boinc/modules/boincwork/includes/boincwork.forms.inc b/drupal/sites/default/boinc/modules/boincwork/includes/boincwork.forms.inc index b59ca112c9..6a75ddabbb 100644 --- a/drupal/sites/default/boinc/modules/boincwork/includes/boincwork.forms.inc +++ b/drupal/sites/default/boinc/modules/boincwork/includes/boincwork.forms.inc @@ -1719,6 +1719,7 @@ function boincwork_privacyprefs_form(&$form_state) { ); $form['privacy']['show_hosts'] = array( '#title' => bts('Should @project show your computers on its web site?', array('@project' => variable_get('site_name', 'Drupal-BOINC')), NULL, 'boinc:account-preferences-privacy'), + '#description' => bts('At times, you may be asked to enable this option in order to receive help from the forums. Advanced users may need to be able to inspect your computers\' information in order to help diagnose any problems.', array(), NULL, 'boinc:account-preferences-privacy'), '#type' => 'radios', '#options' => $form['boolean_options']['#value'], '#attributes' => array('class' => 'fancy'),