B2G/gecko/services/sync/modules/identity.js
/**
   * Set the username value.
   *
   * Changing the username has the side-effect of wiping credentials.
   */
Set the username value.
Changing the username has the side-effect of wiping credentials.
Set the username value . Changing the username has the side - effect of wiping credentials .
set username(value) {
    if (value) {
      value = value.toLowerCase();
      if (value == this.username) {
        return;
      }
      Svc.Prefs.set("username", value);
    } else {
      Svc.Prefs.reset("username");
    }
    this._log.info("Username changed. Removing stored credentials.");
    this.basicPassword = null;
    this.syncKey = null;
  }
set username ( value ) { if ( value ) { value = value . toLowerCase ( ) ; if ( value == this . username ) { return ; } Svc . Prefs . set ( "username" , value ) ; } else { Svc . Prefs . reset ( "username" ) ; } this . _log . info ( "Username changed. Removing stored credentials." ) ; this . basicPassword = null ; this . syncKey = null ; }
Set the username value.
Set the username value .
// If we change the username, we interpret this as a major change event // and wipe out the credentials. // syncKeyBundle cleared as a result of setting syncKey.