johnbillion / user-switching

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

Request: Add notice with switch back link to Access Denied page in MultiSite #116

Closed MadtownLems closed 1 month ago

MadtownLems commented 2 months ago

When a Network Administrator switches to another user and tries to visit the dashboard of a subsite they don't have access to, they get a screen that talks about how they have no privileges on the site, and a list of the sites they DO have access to. This would be a great screen to output the message about how the user is currently switched to a non-network admin, with a link to switch back.

johnbillion commented 2 months ago

Thanks for the suggestion. I seem to remember that there are no useful hooks on that error screen, but I will take a look.

MadtownLems commented 2 months ago

Perhaps admin_page_access_denied could work?