public function UserController::collectedData in General Data Protection Regulation 3.0.x
Same name and namespace in other branches
- 8.2 src/Controller/UserController.php \Drupal\gdpr\Controller\UserController::collectedData()
- 8 src/Controller/UserController.php \Drupal\gdpr\Controller\UserController::collectedData()
Return the collected data for a user.
Parameters
\Drupal\user\UserInterface $user: The user.
Return value
array|\Symfony\Component\HttpFoundation\RedirectResponse Render array.
1 string reference to 'UserController::collectedData'
File
- src/
Controller/ UserController.php, line 82
Class
- UserController
- Class UserController.
Namespace
Drupal\gdpr\ControllerCode
public function collectedData(UserInterface $user) {
if (!$this
->moduleHandler()
->moduleExists('gdpr_tasks') && !$this
->moduleHandler()
->moduleExists('gdpr_consent')) {
return [
'#markup' => $this
->t('Data stored about you.'),
];
}
if ($this
->moduleHandler()
->moduleExists('gdpr_tasks')) {
return $this
->redirect('view.gdpr_tasks_my_data_requests.page_1', [
'user' => $user
->id(),
]);
}
return $this
->redirect('gdpr_consent.agreements', [
'user' => $user
->id(),
]);
}