Forums / General / Switch user feature ?

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