You are here

public function ApiKeyForm::getUuid in Services API Key Authentication 3.0.x

1 call to ApiKeyForm::getUuid()
ApiKeyForm::save in src/Form/ApiKeyForm.php
Form submission handler for the 'save' action.

File

src/Form/ApiKeyForm.php, line 78

Class

ApiKeyForm
Class ApiKeyForm.

Namespace

Drupal\services_api_key_auth\Form

Code

public function getUuid($uid) {
  if (empty($uid)) {
    return;
  }
  $options = [];
  $account = \Drupal::entityTypeManager()
    ->getStorage('user')
    ->load($uid);
  $uuid = $account->uuid->value;
  return $uuid ? $uuid : '';
}