Prevent logged in users to go to homepage - Joomla! Forum - community, help and support
hi there,
it not as joomla question more php general question, hope can put me in right direction here.
what trying prevent logged in users go homepage. in other words, when user logged in being redirected "www.homepage.com/my-profile", , if logged in user goes "www.homepage.com" should automatic redirected "www.homepage.com/my-profile".
from looking around on google, think code should used:
$user =& jfactory::getuser();
if (!$user->guest) {
echo 'you logged';
}else{echo 'guest';}
but not sure how final code should , placed.
anyway can point me in right direction please?
it not as joomla question more php general question, hope can put me in right direction here.
what trying prevent logged in users go homepage. in other words, when user logged in being redirected "www.homepage.com/my-profile", , if logged in user goes "www.homepage.com" should automatic redirected "www.homepage.com/my-profile".
from looking around on google, think code should used:
$user =& jfactory::getuser();
if (!$user->guest) {
echo 'you logged';
}else{echo 'guest';}
but not sure how final code should , placed.
anyway can point me in right direction please?
[mod note: moved general forum 2.5 coding forum; ]
to you, in future, find correct forum topic please read which forum post question have put together.
to you, in future, find correct forum topic please read which forum post question have put together.
Comments
Post a Comment