You are here

function ga_login_update_6101 in Google Authenticator login 6

Store the current site name as GA Login realm if the realm is not set, to prevent future site name changes from invalidating existing GA accounts.

File

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

Code

function ga_login_update_6101() {

  // 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'));
  }
}