Administrator user

Author Message

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

Pavel Konovalov

Thursday 09 November 2006 5:30:44 am

Thank 2 all for your answer.

Are you gangsters?!
No, we are Russians.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 21:10:31
Script start
Timing: Jan 18 2025 21:10:31
Module start 'layout'
Timing: Jan 18 2025 21:10:31
Module start 'content'
Timing: Jan 18 2025 21:10:32
Module end 'content'
Timing: Jan 18 2025 21:10:32
Script end

Main resources:

Total runtime1.3694 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.7969152.6094
Module start 'layout' 0.00600.0030 740.406339.4297
Module start 'content' 0.00891.3591 779.8359574.0859
Module end 'content' 1.36810.0013 1,353.921912.1875
Script end 1.3694  1,366.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2360160.0002
Check MTime0.00130.0959160.0001
Mysql Total
Database connection0.00090.068210.0009
Mysqli_queries1.318796.2969620.0213
Looping result0.00060.0440600.0000
Template Total1.336297.620.6681
Template load0.00190.141720.0010
Template processing1.334297.430820.6671
Template load and register function0.00010.006610.0001
states
state_id_array0.00160.119210.0016
state_identifier_array0.00200.144020.0010
Override
Cache load0.00170.1219390.0000
Sytem overhead
Fetch class attribute can translate value0.00060.045530.0002
Fetch class attribute name0.00140.100950.0003
XML
Image XML parsing0.00080.060530.0003
class_abstraction
Instantiating content class attribute0.00000.000960.0000
General
dbfile0.00080.0609160.0001
String conversion0.00000.000440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs