johnbillion / user-switching

WordPress plugin that provides instant switching between user accounts.
https://wordpress.org/plugins/user-switching/
GNU General Public License v2.0
187 stars 49 forks source link

Does not work with RegistrationMagic #104

Closed gilitos92 closed 1 year ago

gilitos92 commented 1 year ago

Hi!

I can confirm that the RegistrationMagic plugin is not compatible with the User Switching plugin. RegistrationMagic provides multiple login and security features, which may be the reason for the incompatibility. However, the issue appears to be a general compatibility problem rather than one specific to a particular feature. When I disable RegistrationMagic, User Switching works, but even when I disable each RegistrationMagic feature individually, the issue persists, so I cannot pinpoint the issue with a specific feature.

The main problem is that users are not being switched despite the message "switch back to original user" being displayed. No error message or any other feedback is provided.

Is there anything that can be done about this?

johnbillion commented 1 year ago

Thanks for the report.

To be honest this is best reported to the author of Registration Magic so they can investigate. I've found in the past that when a plugin doesn't work with User Switching it's usually the case that the plugin is being overzealous with its handling of requests to wp-login.php and it prevents not only User Switching from working but also other plugins that provide features such as two factor authentication, different mechanisms for logging in, etc.

Let me know what they say.

gilitos92 commented 1 year ago

It turned out to be a simple redirection issue with RegistrationMagic. I submitted a pull request to add compatibility for the plugin. I didn't want to go through RegistrationMagic, as it is closed source and I wanted the fix to be available to the public. I discovered this after spending a whole day trying to find a solution to my problem, only to find out that others had to contact RegistrationMagic and neither they nor RegistrationMagic shared their solutions with anyone. It was a day I could've spent watching Netflix or something…