illchuk/zfc-user-redirect-uri

ZfcUser redirection to specific URI, rather than to a generic route

v0.1 2017-11-01 21:42 UTC

This package is auto-updated.

Last update: 2024-05-08 08:38:56 UTC


README

Build Status

Install with composer require illchuk/zfc-user-redirect-uri.

Then reference in modules.config.php:

return [
    ..., 'ZfcUser', 'ZfcUserRedirectUri', ...
];

If you're using ZfcUser's /user/login?redirect=ROUTE feature, you may now redirect to any routable URI instead: ROUTE can become for example /ROUTABLE/URI/3?message=OK.

This is especially useful when using ZfcRbac and user is hit with the login screen; they log in then carry on right where they left off.

ZfcRbac config as follows:

'redirect_strategy' => [
	'redirect_when_connected' => true,
	'append_previous_uri' => true,
	'previous_uri_query_key' => 'redirect'
],

N.B. URI's that cannot be routed by your app are silently discarded.