protected function DefaultController::generateWardenRegistrationRedirect in Warden 8
Same name and namespace in other branches
- 8.2 src/Controller/DefaultController.php \Drupal\warden\Controller\DefaultController::generateWardenRegistrationRedirect()
- 3.x src/Controller/DefaultController.php \Drupal\warden\Controller\DefaultController::generateWardenRegistrationRedirect()
Generate a redirect to the Warden server for site registration.
Return value
string
Throws
\Exception
\WardenApi\Exception\EncryptionException
1 call to DefaultController::generateWardenRegistrationRedirect()
- DefaultController::wardenRegistration in src/
Controller/ DefaultController.php - Warden registration form.
File
- src/
Controller/ DefaultController.php, line 110
Class
- DefaultController
- Default controller for the warden module.
Namespace
Drupal\warden\ControllerCode
protected function generateWardenRegistrationRedirect() {
global $base_url;
$site_url = $base_url;
$site_url .= "|" . $this
->getWardenManager()
->getLocalToken();
$site_url_encrypted = $this
->getWardenManager()
->encrypt($site_url);
$site_host_path = $this
->getWardenConfig()
->get('warden_server_host_path');
return $site_host_path . '/sites/add?data=' . $site_url_encrypted;
}