Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » PHP Syntax checking sobi2 details and...
PHP Syntax checking sobi2 details and user type for redirect
PHP Syntax checking sobi2 details and user type for redirect
G'day,
I'm certain I'm suffering from finger trouble and middle age stupidity
Old site I've gone back to after some time - J1.5.26 and MMPro.
Ultimately I want to redirect users who are not logged in or are registered to a sorry page (article id 103) when they try to view sobi2 detail task. Everyone from author and above should be allowed to see the detail page.
Initially I'm testing proof of idea with this code knowing it should only allow authors to see the page.
Code:
$app = &JFactory::getApplication();
if (
$option == 'com_sobi2'
and JRequest::getVar('sobi2Task') == 'sobi2Details'
and MM_NOT_USER_AUTHOR )
$app->redirect("index.php?option=com_content&view=article&id=103&Itemid=132");
With the above in place it's redirecting everybody to the sorry page.
If I replace MM_NOT_USER_AUTHOR with MM_NOT_LOGGED_IN then that works as one would expect - anyone logged in the front end can see the detail - if they're not logged in they get the sorry page.
I'm certain I've got it wrong just can't see the wood for the trees.
All help much appreciated.
Nick
Re: PHP Syntax checking sobi2 details and user type for redirect
Re: PHP Syntax checking sobi2 details and user type for redirect
- Index
- » MetaMod
- » MetaMod General Support
- » PHP Syntax checking sobi2 details and...
Board Info
- Board Stats:
- Total Topics:
- 1700
- Total Polls:
- 6
- Total Posts:
- 5967
- Posts this week:
- 3
- User Info:
- Total Users:
- 8056
- Newest User:
- no21an
- Members Online:
- 0
- Guests Online:
- 229
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked