public function WebformSubmission::convert in Webform 8.5
Same name and namespace in other branches
- 6.x src/Entity/WebformSubmission.php \Drupal\webform\Entity\WebformSubmission::convert()
Convert anonymous submission to authenticated.
Parameters
\Drupal\user\UserInterface $account: An authenticated user account.
Overrides WebformSubmissionInterface::convert
File
- src/
Entity/ WebformSubmission.php, line 909
Class
- WebformSubmission
- Defines the WebformSubmission entity.
Namespace
Drupal\webform\EntityCode
public function convert(UserInterface $account) {
$this->converting = TRUE;
$this
->setOwner($account);
$this
->save();
$this->converting = FALSE;
}