Switch user feature ?

Author Message

Benjamin Choquet

Friday 14 January 2011 2:52:03 am

Hi,

I was wondering if there was any way for an admin to switch user in backend ? I'm willing to check out a few users notification preferences and I can't find any other way than logging in with the user's password (which I happen not to know) where a convenient menu option or button would be great.

Is there any hidden feature or extension that does the job ?

Bertrand Dunogier

Friday 14 January 2011 3:04:39 am

Well, there is a very old extension that had this feature:

http://projects.ez.no/ezadmin

Maybe you can look into it a bit, and use it as a basis ?

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Benjamin Choquet

Friday 14 January 2011 4:58:15 am

Thanks Bertrand, this is exactly what I was looking for. I wasn't expecting the login/logout process to be so easy though :) I'll try to come up with a neat UI for this.

BTW what's the recommended way of integrating new features in existing admin templates ? My guess is I'll have to override a few templates but are there guidelines to make it the less obstrusive as possible ?

Bertrand Dunogier

Saturday 15 January 2011 1:19:23 am

First, remember that this extension is really old, and parts of the API might have changed in between. But it shouldn't have got much more complex :-)

Then regarding the UI... if you want to integrate your feature in existing templates, it will indeed require overrides. The goal would of course be to override the least specific templates you can find so that it overlaps as little as possible with existing features.

The first ways that come to mind are:

- new right side menu block
- new admin tab (through menu.ini)

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Gaetano Giunta

Saturday 15 January 2011 4:37:47 am

If that extension does not work, just ping me again. I should have the code for this lying around:

- a module/view that switches logged in user

- a template adding a button to impersonate a user (in the 'user account' view in the admin interface)

Principal Consultant International Business
Member of the Community Project Board

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 10:38:49
Script start
Timing: Jan 18 2025 10:38:49
Module start 'layout'
Timing: Jan 18 2025 10:38:49
Module start 'content'
Timing: Jan 18 2025 10:38:50
Module end 'content'
Timing: Jan 18 2025 10:38:50
Script end

Main resources:

Total runtime0.6268 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.7891152.6094
Module start 'layout' 0.00640.0031 740.398439.4375
Module start 'content' 0.00950.6159 779.8359603.6875
Module end 'content' 0.62540.0013 1,383.523412.1875
Script end 0.6267  1,395.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5319160.0002
Check MTime0.00140.2184160.0001
Mysql Total
Database connection0.00110.177010.0011
Mysqli_queries0.568990.7732660.0086
Looping result0.00060.1002640.0000
Template Total0.593394.720.2967
Template load0.00190.298020.0009
Template processing0.591494.363020.2957
Template load and register function0.00010.023810.0001
states
state_id_array0.00110.172610.0011
state_identifier_array0.00080.135520.0004
Override
Cache load0.00160.2509310.0001
Sytem overhead
Fetch class attribute can translate value0.00070.116930.0002
Fetch class attribute name0.00150.246970.0002
XML
Image XML parsing0.00120.197230.0004
class_abstraction
Instantiating content class attribute0.00000.003080.0000
General
dbfile0.00210.3414220.0001
String conversion0.00000.001740.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/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: 21
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs