Get logged int user id - Joomla! Forum - community, help and support


i'm trying create file in joomla show if user id logged in or not. have code:

code: select all

<?php
ob_start();
session_start();
?>
<!doctype html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <link rel="stylesheet" type="text/css" href="http://www.shoppingkatalog.com/biblioteka/css/style.css">
        <title>Библиотека на shoppingkatalog.com</title>
    </head>
    <body align="center">
        <div id="login">
        <?php

   $checkuser = jfactory::getuser();
if ($checkuser->get('gid')>0){
echo "logged in";
}
   ...

but wont work , shows message
fatal error: class 'jfactory' not found in /
. file located in root/folder/this_is_the_file.php . why doesn't work?

that's because file stand alone, , not run under joomla.





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support