Compare commits

..

No commits in common. "ee7d9623a37d2ae3b0dfa9ef04915914a40f1d5b" and "66040d69db0e631302559b9be732181c732d7a40" have entirely different histories.

2 changed files with 3 additions and 8 deletions

View File

@ -44,10 +44,8 @@ class Mail
if (!empty($_ENV['MAIL_HOST'])) { if (!empty($_ENV['MAIL_HOST'])) {
$mailer->Mailer = 'smtp'; $mailer->Mailer = 'smtp';
$mailer->Host = $_ENV['MAIL_HOST']; $mailer->Host = $_ENV['MAIL_HOST'];
$mailer->Port = !empty($_ENV['MAIL_PORT']) ? $_ENV['MAIL_PORT'] : 587; $mailer->Port = !empty($_ENV['MAIL_PORT']) ? $_ENV['MAIL_PORT'] : 25;
$mailer->SMTPSecure = !empty($_ENV['MAIL_SECURE']) ? $_ENV['MAIL_SECURE'] : '';
$secureMaping = ['none' => '', 'starttls' => PHPMailer::ENCRYPTION_STARTTLS, 'smtps' => PHPMailer::ENCRYPTION_SMTPS];
$mailer->SMTPSecure = !empty($_ENV['MAIL_SECURE']) ? $secureMaping[$_ENV['MAIL_SECURE']] : '';
if (!empty($_ENV['MAIL_USER'])) { if (!empty($_ENV['MAIL_USER'])) {
$mailer->SMTPAuth = true; $mailer->SMTPAuth = true;

View File

@ -168,10 +168,7 @@ class HttpResponse
private function redirectToLogin(): void private function redirectToLogin(): void
{ {
$this->request->session()->set('redirect_after_login', $this->rawUrl); $this->request->session()->set('redirect_after_login', $this->rawUrl);
$response = new Redirect( $response = new Redirect($this->routeCollection->getRoute($this->appConfig['loginRouteId'])->generateLink(), IRedirect::TEMPORARY);
$this->routeCollection->getRoute($this->appConfig['loginRouteId'])
->generateLink(['redirect_after_login' => urlencode($this->rawUrl)]),
IRedirect::TEMPORARY);
header('Location: ' . $this->getRedirectUrl($response), true, $response->getHttpCode()); header('Location: ' . $this->getRedirectUrl($response), true, $response->getHttpCode());
} }