You are here

function ga_login_update_7102 in Google Authenticator login 7

Store the current site name as GA Login realm if the realm is not set.

Needed to prevent future site name changes from invalidating existing GA accounts.

File

./ga_login.install, line 76
Install, update and uninstall functions for the ga_login module.

Code

function ga_login_update_7102() {

  // Only save the current site name if the ga_login_textname variable is
  // currently not set. If it is set to empty (''), leave it as is since
  // changing it to site name will invalidate existing accounts.
  if (variable_get('ga_login_textname', FALSE) === FALSE) {
    variable_set('ga_login_textname', variable_get('site_name', 'Drupal'));
  }
}