You are here

public function LingotekApi::getProfileAttributes in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::getProfileAttributes()
  2. 7.3 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::getProfileAttributes()
  3. 7.4 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::getProfileAttributes()
  4. 7.5 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::getProfileAttributes()
  5. 7.6 lib/Drupal/lingotek/LingotekApi.php \LingotekApi::getProfileAttributes()

Get a User Profile Attributes

Note: the Request() method will switch the ExternalID to whatever is passed in, instead of the regular ExternalID.

1 call to LingotekApi::getProfileAttributes()
LingotekApi::getProfileId in lib/Drupal/lingotek/LingotekApi.php
Uses getProfileAttributes to Get the User Profile Attributes, and return the ID.

File

lib/Drupal/lingotek/LingotekApi.php, line 529
Defines Drupal\lingotek\LingotekApi

Class

LingotekApi
@file Defines Drupal\lingotek\LingotekApi

Code

public function getProfileAttributes($externalId = NULL) {
  $result = FALSE;
  $parameters = array();
  if (isset($externalId)) {
    $parameters['externalId'] = $externalId;
  }
  if ($output = $this
    ->request('getProfileAttributes', $parameters)) {
    if ($output->results == 'success' && is_object($output->attributes)) {
      $result = $output->attributes;
    }
  }

  /*
    stdClass::__set_state(array(
       'results' => 'success',
       'attributes' =>
      stdClass::__set_state(array(
         'id' => 26,
         'name' => 'Community Admin',
         'login_id' => 'community_admin@S8NFUBG8',
         'on_leaderboard' => false,
         'language_skills' =>
        array (
        ),
      )),
    ))
  */
  return $result;
}