feat(microsoft-integration): enhance email permissions and consent flow for Outlook integration
This commit is contained in:
@@ -138,7 +138,14 @@ $saveStmt = $db->prepare("
|
||||
");
|
||||
$saveStmt->execute([$user['id'], $accessToken, $refreshToken, json_encode($newSettings)]);
|
||||
|
||||
// 8. Succesvol terugkeren naar de Persoonlijke Profiel Hub
|
||||
header('Location: /profile.php?success=' . urlencode("Microsoft Outlook succesvol gekoppeld als {$accountEmail}!"));
|
||||
// 8. Succesvol terugkeren naar de gewenste pagina of het Persoonlijk Profiel
|
||||
$returnTo = $_SESSION['ms_oauth_return_to'] ?? '/profile.php';
|
||||
unset($_SESSION['ms_oauth_return_to']);
|
||||
|
||||
$redirectUrl = ($returnTo === '/mail.php')
|
||||
? '/mail.php?success=' . urlencode("Microsoft Outlook 365 e-mail & agenda succesvol gekoppeld als {$accountEmail}!")
|
||||
: '/profile.php?success=' . urlencode("Microsoft Outlook succesvol gekoppeld als {$accountEmail}!");
|
||||
|
||||
header('Location: ' . $redirectUrl);
|
||||
exit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user