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:
but wont work , shows message
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
. file located in root/folder/this_is_the_file.php . why doesn't work?fatal error: class 'jfactory' not found in /
that's because file stand alone, , not run under joomla.
Comments
Post a Comment