Forums / Developer / Administrator user
Pavel Konovalov
Wednesday 08 November 2006 6:24:22 am
Hi 2 all.
I hope that someone can reply to my question. How to trace that the current user is administrator?Thank you.
Are you gangsters?! No, we are Russians.
sangib das
Thursday 09 November 2006 3:55:23 am
Hi Pavel Konovalov I think it may help you. you go to admin side and click on Set Up menu from top. After clicking it will displays on the left hand side some link suck as #Cache management #Classes #Collected information #Extensions #Global settings #Ini settings #Languages #PDF export #Packages #RAD #Roles and policies #RSS #Search statistics #Sections #Sessions (Click here to know user and Admin User) Thanks Sangib
Claudia Kosny
Thursday 09 November 2006 4:04:44 am
Hi Pavel
the admin that was created during install has always user id 14, so you could check for that.
If you want to check whether a user is in the administrator group just retrieve the 'groups' attribute of the ezuser object and check whether the admin group is in this array.
If you want to check whether a user has an admin role assigned you could retrieve the 'role_id_list' attribute of the ezuser object and then check whether the ids of whatever admin roles you have are in this array.
Greetings from Luxembourg
Claudia
Thursday 09 November 2006 5:30:44 am
Thank 2 all for your answer.