public function UserManager::createProfile in Open Social 8.4
Same name and namespace in other branches
- 8.9 modules/custom/social_auth_extra/src/UserManager.php \Drupal\social_auth_extra\UserManager::createProfile()
- 8 modules/custom/social_auth_extra/src/UserManager.php \Drupal\social_auth_extra\UserManager::createProfile()
- 8.2 modules/custom/social_auth_extra/src/UserManager.php \Drupal\social_auth_extra\UserManager::createProfile()
- 8.3 modules/custom/social_auth_extra/src/UserManager.php \Drupal\social_auth_extra\UserManager::createProfile()
- 8.5 modules/custom/social_auth_extra/src/UserManager.php \Drupal\social_auth_extra\UserManager::createProfile()
- 8.6 modules/custom/social_auth_extra/src/UserManager.php \Drupal\social_auth_extra\UserManager::createProfile()
- 8.7 modules/custom/social_auth_extra/src/UserManager.php \Drupal\social_auth_extra\UserManager::createProfile()
- 8.8 modules/custom/social_auth_extra/src/UserManager.php \Drupal\social_auth_extra\UserManager::createProfile()
Creates object of a new profile.
Parameters
array $values: Additional fields to save in the created profile.
Return value
\Drupal\Core\Entity\EntityInterface Object of a new user profile.
Overrides UserManagerInterface::createProfile
File
- modules/
custom/ social_auth_extra/ src/ UserManager.php, line 97
Class
- UserManager
- Class UserManager.
Namespace
Drupal\social_auth_extraCode
public function createProfile(array $values = []) {
$values = array_merge([
'uid' => $this->account ? $this->account
->id() : NULL,
'type' => $this->profileType,
], $values);
$this->profile = $this->entityTypeManager
->getStorage('profile')
->create($values);
return $this->profile;
}