0

Hey, I've been looking for a solution to this particular problem for a few days now with no luck. I'm working with Community Builder for a login page to a Joomla website. The site has some pages that require the user to be registered to have access to, and if they try to view the page without authentication they get redirected to the CB login page. The problem is that, after providing the proper login information, the user is sent to the index.php page. I'm trying to find something through code or plugin that'll allow me to redirect the user back to the page they are trying to view after logging in. Does anybody know of a method to implement this?

1 Answer 1

0

You can create a system plugin with event onAfterDispatch. Here you can check if user has access to the requested url (through joomla acl functions). If not then redirect the user to cb login page with additional query parameter return=base64_encode_url. It will set the hidden field named 'return' in login form and user will be redirected to that url after login.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.