You are here

function securelogin_update_7000 in Secure Login 7

Implements hook_update_N().

File

./securelogin.install, line 44
Install, update and uninstall functions for Secure Login module.

Code

function securelogin_update_7000() {
  global $base_secure_url;

  // Rename variables to have more systematic names.
  variable_set('securelogin_base_url', variable_get('securelogin_baseurl', $base_secure_url));
  variable_del('securelogin_baseurl');
  $settings = array(
    'securelogin_form_user_login' => 'securelogin_loginform',
    'securelogin_form_user_login_block' => 'securelogin_loginform',
    'securelogin_form_user_profile_form' => 'securelogin_profileform',
    'securelogin_form_user_register_form' => 'securelogin_registerform',
  );
  foreach ($settings as $new_setting => $old_setting) {
    variable_set($new_setting, variable_get($old_setting, 1));
  }
  foreach ($settings as $old_setting) {
    variable_del($old_setting);
  }

  // The redirect functionality is no longer supported because it requires
  // mixed-mode (secure and insecure) sessions.
  variable_del('securelogin_redirect');
  variable_del('securelogin_original_baseurl');
}