Elxis CMS Forum
Support => Administration => Topic started by: Davide on July 23, 2011, 15:20:55
-
How is possible in php to define that only administrator has the enough power to see a specific link that i had manually insert in the source code?
-
Administrator belongs at group's id = 25. So you can do that like :
global $my;
if ($my->gid == 25) {
echo '<a href="http://www.example.com" title="title of example website" target="_blank">Link's text here</a>';
}
-
i can't check if is really working but i appreciate your help, where you are seeing the number of the id of the group of administrator or superadministrator? i'm checking the database but there's no more than 3 or 6 id in order not 25... also in elxis on user's group there's no this high number
-
table name elx_core_acl_aro_groups right? is not better to use group_id instead of gid?
-
You asked me Davide :
How is possible in php to define that only administrator...
And i answered you :
global $my;
if ($my->gid == 25) {
echo '<a href="http://www.example.com" title="title of example website" target="_blank">Link's text here</a>';
}
Now what are you looking for exactly?
-
uò nothing just understanding if you take this number "25" from the table of the database that i've previous posted. thank you for your help.
-
1. The unique id of each group is stored in DB.
2. The basic groups with different security access it is also in the core code of Elxis.
Yes, the elx_core_acl_aro_groups is the table where is stored all the "gid" all the unique numbers.
The proper solution of permitting something only for those who has the id is to use the gid, as webgift told you.