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:

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

Popular posts from this blog

How to decompile jsxbin to jsx

Gavik Photoslide GK2: Not able to upload photos - Joomla! Forum - community, help and support

Phoca Guestbook logger registret bruger af - Joomla! Forum - community, help and support