Hi,
In a CC table, I want the datas displayed to the registred user only FROM this user. But if the user is an admin (or an author) i want ALL datas displayed.
I have looked for a solution on the forum for this question and have find this topic vith this tip :
But as Bob said, this is for Joomla 1.5 and I'm working on Joomla 2.5.9 with CC 4.0.RC3.2
So when i use this code, user actually read only HIS datas, but Admin has no access. Maybe is it coming from the diffrence of Joomla version ?
If anybody could suggest me something ? Thanks by advance...
In a CC table, I want the datas displayed to the registred user only FROM this user. But if the user is an admin (or an author) i want ALL datas displayed.
I have looked for a solution on the forum for this question and have find this topic vith this tip :
<?php
$user =& JFactory::getUser();
if ( !in_array($user->gid, array('24', '25')) ) {
// user is not an admin
echo "WHERE `cf_user_id` = '{$user->id}'";
}
?>
But as Bob said, this is for Joomla 1.5 and I'm working on Joomla 2.5.9 with CC 4.0.RC3.2
So when i use this code, user actually read only HIS datas, but Admin has no access. Maybe is it coming from the diffrence of Joomla version ?
If anybody could suggest me something ? Thanks by advance...