code: public function getIdentityFields()
      {
          if (!$this->getEnableUsername()
              && in_array('username', $this->identityFields)
              && ($keys = array_keys($this->identityFields, 'username'))
          ) {
              foreach ($keys as $key) {
                  unset($this->identityFields[$key]);
              }
          }
  
          return $this->identityFields;
      }
docs: {@inheritDoc}