Skip to content

Commit

Permalink
more _target_path changes
Browse files Browse the repository at this point in the history
  • Loading branch information
darrylhein committed Feb 6, 2020
1 parent afec211 commit 2f33776
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Controller/ActivateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ protected function getTargetPath(Request $request)
if (!$targetPath) {
$targetPath = $request->query->get('target_path');
}
if (!$targetPath) {
$targetPath = $request->request->get('_target_path');
}
if (!$targetPath) {
$targetPath = $request->query->get('_target_path');
}

return $targetPath;
}
}
}
6 changes: 6 additions & 0 deletions Listener/ResettingListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ protected function getTargetPath(Request $request)
if (!$targetPath) {
$targetPath = $request->query->get('target_path');
}
if (!$targetPath) {
$targetPath = $request->request->get('_target_path');
}
if (!$targetPath) {
$targetPath = $request->query->get('_target_path');
}

return $targetPath;
}
Expand Down
4 changes: 2 additions & 2 deletions Resources/views/Activate/activate_content.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{{ form_start(form, { 'action': path('xm_security_activate', {'token': token}) }) }}

{% if target_path is defined %}
<input type="hidden" name="target_path" value="{{ target_path }}">
<input type="hidden" name="_target_path" value="{{ target_path }}">
{% endif %}

<div class="field-wrap form-field_wrap">
Expand All @@ -26,4 +26,4 @@
<a href="{{ path('fos_user_security_login') }}" class="form-action form-action_link">{{ 'xm_security.activate.return_to_login'|trans([], 'XMSecurityBundle') }}</a>
</div>
{{ form_end(form) }}
</div>
</div>

0 comments on commit 2f33776

Please sign in to comment.