We use the module Masquerade. This module enables our administrators to switch the user and test the site as another user.

After activating of the module Email TFA, is the email authentication code required, when an administrator tries to switch to another user account. The authentication code is sent to the user, into its account the administrator wants to switch.

Has anyone an idea, how to solve this issue?

Issue fork email_tfa-3254512

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Antonín Slejška created an issue. See original summary.

antonín slejška’s picture

Issue summary: View changes

abdulaziz zaid made their first commit to this issue’s fork.

  • abdulaziz zaid committed 8a7a31c on 3254512-to-switch-users
    Issue #3254512 To switch users with the module Masquerade
    

abdulaziz zaid’s picture

Status: Active » Needs review

Thank you, Antonín Slejška

Can you review and confirm?

https://git.drupalcode.org/project/email_tfa/-/merge_requests/6

antonín slejška’s picture

Status: Needs review » Reviewed & tested by the community

Hi Abdulaziz and thanks for the patch.

I'm sorry for the delay. I've had winter vacation and was with my family in a ski resort.

I tested the patch as the "user one" and also as a standard administrator. Everything worked as expected.

I have also read the code of the patch, and it looks fine. (The method "\Drupal::service('masquerade')->isMasquerading()" is new for me. I have learned something.)

abdulaziz zaid’s picture

Status: Reviewed & tested by the community » Fixed

Hi Antonín Slejška and thanks for the review I push the new releases today.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.