aboutsummaryrefslogtreecommitdiff
path: root/mod/twitter_api/lib
diff options
context:
space:
mode:
Diffstat (limited to 'mod/twitter_api/lib')
-rw-r--r--mod/twitter_api/lib/twitter_api.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/mod/twitter_api/lib/twitter_api.php b/mod/twitter_api/lib/twitter_api.php
index 81c9c6628..e163d2b3e 100644
--- a/mod/twitter_api/lib/twitter_api.php
+++ b/mod/twitter_api/lib/twitter_api.php
@@ -44,7 +44,9 @@ function twitter_api_forward() {
'persistent' => (bool) get_input("persistent"),
);
// capture referrer if in site, but not the twitter_api
- if (!empty($_SERVER['HTTP_REFERER'])
+ if (!empty($SESSION['last_forward_from'])) {
+ $login_metadata['forward'] = $SESSION['last_forward_from'];
+ } elseif (!empty($_SERVER['HTTP_REFERER'])
&& 0 === strpos($_SERVER['HTTP_REFERER'], elgg_get_site_url())
&& 0 !== strpos($_SERVER['HTTP_REFERER'], elgg_get_site_url() . 'twitter_api/')) {
$login_metadata['forward'] = $_SERVER['HTTP_REFERER'];