3

Does anyone know if it's possible to show the 'Login as member' link, (available to super admins on Member Profile view, under 'Member Administration') to other member groups??

3

Unfortunately this is not possible without hacking the EE core.

If you look at the do_login_as_member() function around line 590 of system/expressionengine/controllers/cp/members.php you will see:

    if ($this->session->userdata['group_id'] != 1)
    {
        show_error(lang('unauthorized_access'));
    }

ie, the access restriction of this function to superadmins is hardcoded into the core. You would need to either hack that file (and document it so that when you update EE you can reinstate it) or write an extension based on the code from that function.

| improve this answer | |
  • Just changing this line won't work, you have to also find the form used to submit your admin password, etc. I haven't been able to find that code yet, though. – kmgdev Nov 21 '13 at 17:03
  • Correction, it's not the form I can't find, it's the code that allows the member group to view the form. – kmgdev Nov 21 '13 at 17:41
  • The form code is found in /system/expressionengine/views/members/login_as_member.php (which will call members.php->do_login_as_member()) – Bjørn Børresen Nov 22 '13 at 12:15
1

This is not possible without hacking the core code. You could write an extension or something to do it most likely so you didn't have to hack the code, but bottom line is some code must be written.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.