joomla2.5 - How to get current user login details in joomla -


i have 1 doubt in joomla. can able user login details while accessing index.php...whereas if created new folder named test , inside folder have created index.php , have used below code in case user details not showing. please me on

$user =& jfactory::getuser();  if (!$user->guest) {   echo 'you logged in as:<br />';   echo 'user name: ' . $user->username . '<br />';   echo 'real name: ' . $user->name . '<br />';   echo 'user id  : ' . $user->id . '<br />'; } 

as far understand problem can access joomla function within it's scope. other words can not access joomla core function if framework not included in page running.

to access core functions outside of joomla include framework so. please google , see how should done.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -