/** * If the page containing the mail is access protected, * access permission can be simulated when fetching the e-mail * by adding a special parameter to the URL * * @param string $url The URL * * @return string The URL with the added values */ public function addSimulateUsergroup($url) { if ($this->simulateUsergroup && MathUtility::canBeInterpretedAsInteger($this->simulateUsergroup)) { return $url . '&dmail_fe_group=' . (int) $this->simulateUsergroup . '&access_token=' . DirectMailUtility::createAndGetAccessToken(); } return $url; }