You are here

public function UserDeveloperConverter::convertUser in Apigee Edge 8

Same name in this branch
  1. 8 src/UserDeveloperConverter.php \Drupal\apigee_edge\UserDeveloperConverter::convertUser()
  2. 8 tests/modules/apigee_edge_test/src/UserDeveloperConverter.php \Drupal\apigee_edge_test\UserDeveloperConverter::convertUser()

Push but do not sync Drupal user roles to Apigee Edge.

Overrides UserDeveloperConverter::convertUser

File

tests/modules/apigee_edge_test/src/UserDeveloperConverter.php, line 74

Class

UserDeveloperConverter
Service decorator for user-developer converter.

Namespace

Drupal\apigee_edge_test

Code

public function convertUser(UserInterface $user) : UserToDeveloperConversionResult {
  $original_result = parent::convertUser($user);
  $original_result
    ->getDeveloper()
    ->setAttribute(static::DRUPAL_ROLE_ATTRIBUTE_NAME, implode(',', $user
    ->getRoles()));
  return new UserToDeveloperConversionResult($original_result
    ->getDeveloper(), $original_result
    ->getSuccessfullyAppliedChanges() + 1, $original_result
    ->getProblems());
}