one is $userdata['session_logged_in']
I found i could use $user->data['user_id'] != ANONYMOUS
but i find it not very elegant..
-------------------------
the other question was $userdata[user_level] == ADMIN
i found to ways to do it:
either:
check if user is in group id 7 (which seems to be admin)
or put this code at the top of the page:
Code: Select all
$is_the_admin = 0;
$is_the_admin = ($auth->acl_get('a_') && $user->data['user_id'] != ANONYMOUS) ? 1 : 0 ;
_____________
I was asking if there were more elegant ways to do it?
Luciano