Component - Joomla! Forum - community, help and support
hi there,
i'm developing component want accessed registered user's. have tried bit of code telling me wether user logged in:
but wanted know best practice be? should called in controller? ideally user prompted login if aren't , redirected component, can done?
thanks in advance.
i'm developing component want accessed registered user's. have tried bit of code telling me wether user logged in:
code: select all
$user =& jfactory::getuser();
if ($user->guest)
{
echo "<p>you not logged in.</p>";
}
else
{
echo "<p>you logged in.</p>";
}
but wanted know best practice be? should called in controller? ideally user prompted login if aren't , redirected component, can done?
thanks in advance.
then need edit file redirect them component log people in. far know can et parameter in login module.
Comments
Post a Comment