Thanks for this plug-in! It solved my problem of having the Joomla login component sneak in from unexpected places.
There is one thing I can't get to work, and others seem to be having this problem, too. I am on Joomla! 2.5.8 Stable [ Ember ] 8-November-2012 14:00 GMT, and my test case is:
1) I have a menu item set to Public access that points to an article that is at Registered access.
2) With this plug-in installed, when I am not logged in, and choose the menu item, Joomla throws an authorization error and no redirect happens.
3) So...I found a hack on the forge to change /components/com_content/views/article/view.html.php to redirect the authorization error to com_user - replace JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR')); with $referer= $_SERVER; $app->redirect(JRoute::_('index.php?option=com_users&view=login&return='.base64_encode($referer))); This worked, and the redirect to CB login happens now.
4) However, when I login during the redirect, I get the home page instead of the originally requested URL. And if I register instead, I get a CB 'you may now login page'.
Any ideas how I can get CB Login to forward through to the original URL after login and registration?
I can provide a test URL if that helps but I'd rather not post it here.
Any help or hints would be appreciated. And thanks again for the redirect plugin!