You are here

social_auth_google.module in Open Social 8.8

Module file for Social Auth Google.

File

modules/custom/social_auth_google/social_auth_google.module
View source
<?php

/**
 * @file
 * Module file for Social Auth Google.
 */
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\BaseFieldDefinition;

/**
 * Implements hook_entity_base_field_info().
 */
function social_auth_google_entity_base_field_info(EntityTypeInterface $entity_type) {
  if ($entity_type
    ->id() == 'user') {
    $fields['google_id'] = BaseFieldDefinition::create('string')
      ->setLabel(t('Google user ID'))
      ->setTranslatable(FALSE);
    return $fields;
  }
}