Skip to content

Commit 0671e34

Browse files
authored
Merge pull request #682 from topcoder-platform/issues-681
Issues-681: Redirect issue after login
2 parents a88f5ae + ef16b0b commit 0671e34

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

vanilla/applications/dashboard/controllers/class.entrycontroller.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,11 @@ protected function checkOverride($type, $target, $transientKey = null) {
375375
// FIX: micro-frontends-forums-app issues-12
376376
$isEmbedded = (bool) c('Garden.Embed.Allow',false);
377377
$remoteUrl = c("Garden.Embed.RemoteUrl");
378-
if($isEmbedded && is_string( $remoteUrl)) {
378+
379+
// FIX Issues-681: signing from Forum
380+
$forceEmbed = $this->Request->get('Source', '') != 'forum';
381+
382+
if($isEmbedded && is_string( $remoteUrl) && $forceEmbed) {
379383
$targetUrl = rawurlencode($remoteUrl.'/#'.url($target));
380384
} else {
381385
$targetUrl = rawurlencode(url($target, true));

vanilla/library/core/functions.render.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,8 @@ function signInUrl($target = '', $force = false) {
17291729
$target = '' ;
17301730
}
17311731

1732-
return '/entry/signin'.($target ? '?Target='.urlencode($target) : '');
1732+
// FIX Issues-681: signing from Forum
1733+
return '/entry/signin'.($target ? '?Source=forum&Target='.urlencode($target) : '?Source=forum');
17331734
}
17341735
}
17351736

0 commit comments

Comments
 (0)