Page displays “here” after clicking a user to login as.
Changing the URL to the root shows the user’s account page correctly. The user’s account page does not display after the initial click on “Login as…”
Also, clicking the “go back to admin as P3 Tech” button results in the same result – only “here” is displayed on the page.
With Query Monitor installed, and refreshing the page shows this message:
————————————————–
This message was triggered by login-as-user.
Call stack:
wp_die()
w357LoginAsUser->action_init()
do_action('init')
When trying to use the Login as [user] button, I get a 502 Gateway error.
The error I see in the nginx logs is: “upstream sent too big header while reading response header from upstream”nginx error”
` wp-core
version: 6.7
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 1
blog_public: 0
default_comment_status: open
environment_type: production
user_count: 4
dotorg_communication: true wp-paths-sizes
wordpress_path: /var/www/vhosts/xyz.com/xyz.com
wordpress_size: loading…
uploads_path: /var/www/vhosts/xyz.com/xyz.com/wp-content/uploads
uploads_size: loading…
themes_path: /var/www/vhosts/xyz.com/xyz.com/wp-content/themes
themes_size: loading…
plugins_path: /var/www/vhosts/xyz.com/xyz.com/wp-content/plugins
plugins_size: loading…
fonts_path: /var/www/vhosts/xyz.com/xyz.com/wp-content/uploads/fonts
fonts_size: loading…
database_size: loading…
total_size: loading… wp-dropins (1)
maintenance.php: true wp-active-theme
name: Bricks Child Theme (bricks-child)
version: 1.1
author: Bricks
author_website: https://bricksbuilder.io/
parent_theme: Bricks (bricks)
theme_features: core-block-patterns, post-thumbnails, widgets-block-editor, automatic-feed-links, title-tag, html5, menus, align-wide, woocommerce, wc-product-gallery-slider, wc-product-gallery-zoom, wc-product-gallery-lightbox, widgets
theme_path: /var/www/vhosts/xyz.com/xyz.com/wp-content/themes/bricks-child
auto_update: Disabled wp-parent-theme
name: Bricks (bricks)
version: 1.11 (latest version: 1.11.1.1)
author: Bricks
author_website: https://bricksbuilder.io/
theme_path: /var/www/vhosts/xyz.com/xyz.com/wp-content/themes/bricks
auto_update: Disabled wp-themes-inactive (2)
Twenty Twenty-Five: version: 1.0, author: the WordPress team, Auto-updates disabled
Twenty Twenty-Four: version: 1.2, author: the WordPress team (latest version: 1.3), Auto-updates disabled wp-mu-plugins (2)
WP STAGING Optimizer: version: 1.5.6, author: WP STAGING
WP Toolkit Worker Plugin: author: (undefined), version: 6.5.0-8664 wp-plugins-active (30)
Admin and Site Enhancements (ASE): version: 7.5.3, author: wpase.com, Auto-updates disabled
Advanced Custom Fields PRO: version: 6.3.11, author: WP Engine, Auto-updates disabled
Automatic.css: version: 3.2.2, author: Kevin Geary, Matteo Greco, Auto-updates disabled
Enable Media Replace: version: 4.1.5, author: ShortPixel, Auto-updates disabled
FluentSMTP: version: 2.2.81, author: FluentSMTP & WPManageNinja Team, Auto-updates disabled
Frames: version: 1.4.29, author: Kevin Geary, Matteo Greco, Auto-updates disabled
Google for WooCommerce: version: 2.8.7, author: WooCommerce, Auto-updates disabled
HappyFiles Pro: version: 1.8.3, author: Codeer, Auto-updates disabled
Jetpack: version: 14.0, author: Automattic, Auto-updates disabled
LearnDash LMS: version: 4.18.1, author: LearnDash (latest version: 4.18.1.1), Auto-updates disabled
LearnDash LMS - Certificate Builder: version: 1.1.2, author: LearnDash (latest version: 1.1.3), Auto-updates disabled
LearnDash LMS - Course Grid: version: 2.0.10, author: LearnDash, Auto-updates disabled
LearnDash LMS - Notifications: version: 1.6.4, author: LearnDash, Auto-updates disabled
LearnDash LMS - WooCommerce Integration: version: 2.0.1, author: LearnDash, Auto-updates disabled
Login as User: version: 1.5.6, author: Web357, Auto-updates disabled
MainWP Child: version: 5.2, author: MainWP, Auto-updates disabled
MainWP Child Reports: version: 2.2.3, author: MainWP, Auto-updates disabled
MemberPress Account Nav Tabs: version: 1.0.2, author: Caseproof, LLC, Auto-updates disabled
Members: version: 3.2.10, author: MemberPress, Auto-updates disabled
One User Avatar: version: 2.5.0, author: One Designs, Auto-updates disabled
Rank Math SEO: version: 1.0.232, author: Rank Math SEO, Auto-updates disabled
Rank Math SEO PRO: version: 3.0.53, author: Rank Math, Auto-updates disabled
Uncanny Toolkit for LearnDash: version: 3.7.0.1, author: Uncanny Owl, Auto-updates disabled
WooCommerce: version: 9.4.1, author: Automattic (latest version: 9.4.2), Auto-updates disabled
WooCommerce.com Update Manager: version: 1.0.3, author: Automattic, Auto-updates disabled
WooCommerce Shipping & Tax: version: 2.8.3, author: WooCommerce, Auto-updates disabled
WooCommerce Stripe Gateway: version: 8.9.0, author: Stripe, Auto-updates disabled
WPCodeBox 2: version: 1.1.1, author: WPCodeBox, Auto-updates disabled
WP Crontrol: version: 1.17.0, author: John Blackbourn, Auto-updates disabled
WS Form LITE: version: 1.9.249, author: WS Form, Auto-updates disabled wp-plugins-inactive (6)
Akismet Anti-spam: Spam Protection: version: 5.3.5, author: Automattic - Anti-spam Team, Auto-updates disabled
Hello Dolly: version: 1.7.2, author: Matt Mullenweg, Auto-updates disabled
MemberPress Courses: version: 1.3.5, author: Caseproof LLC, Auto-updates disabled
MemberPress Developer Tools: version: 1.2.19, author: Caseproof, LLC, Auto-updates disabled
MemberPress Plus: version: 1.11.33, author: Caseproof, LLC, Auto-updates disabled
WooPayments: version: 8.5.0, author: WooCommerce, Auto-updates disabled wp-media
image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1690
imagemagick_version: ImageMagick 6.9.10-68 Q16 x86_64 2024-04-16 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: 1
post_max_size: 8M
upload_max_filesize: 8M
max_effective_size: 8 MB
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 23 GB
imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
imagick::RESOURCETYPE_FILE: 6144
imagick::RESOURCETYPE_MAP: 23 GB
imagick::RESOURCETYPE_MEMORY: 12 GB
imagick::RESOURCETYPE_THREAD: 1
imagick::RESOURCETYPE_TIME: 9.2233720368548E+18
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: not available wp-server
server_architecture: Linux 3.10.0-1160.119.1.el7.tuxcare.els8.x86_64 x86_64
httpd_software: Apache
php_version: 8.2.25 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 90
memory_limit: 512M
max_input_time: 90
upload_max_filesize: 8M
php_post_max_size: 8M
curl_version: 7.29.0 NSS/3.90
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: false
current: 2024-11-19T16:38:16+00:00
utc-time: Tuesday, 19-Nov-24 16:38:16 UTC
server-time: 2024-11-19T16:38:14+00:00 wp-database
extension: mysqli
server_version: 10.9.8-MariaDB
client_version: mysqlnd 8.2.25
max_allowed_packet: 16777216
max_connections: 151 wp-constants
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /var/www/vhosts/xyz.com/xyz.com/wp-content
WP_PLUGIN_DIR: /var/www/vhosts/xyz.com/xyz.com/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 512M
WP_DEBUG: false
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: undefined
WP_DEVELOPMENT_MODE: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined wp-filesystem
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
fonts: writable
mu-plugins: writable acf
version: 6.3.11
plugin_type: PRO
update_source: ACF Direct
activated: true
activated_url: https://www.xyz.com
license_type: Freelancer
license_status: active
subscription_expires: 1758581532
ui_field_groups: 5
php_field_groups: 0
json_field_groups: 0
rest_field_groups: 0
post_types_enabled: true
ui_post_types: 33
json_post_types: 0
ui_taxonomies: 20
json_taxonomies: 0
ui_options_pages_enabled: true
ui_options_pages: 0
json_options_pages: 0
php_options_pages: 0
rest_api_format: light
registered_acf_blocks: 0
blocks_per_api_version:
blocks_per_acf_block_version:
blocks_using_post_meta: 0
preload_blocks: true
admin_ui_enabled: true
field_type-modal_enabled: true
field_settings_tabs_enabled: false
shortcode_enabled: true
registered_acf_forms: 0
json_save_paths: 1
json_load_paths: 1 jetpack
site_id: 235772257
ssl_cert: No
time_diff: undefined
version_option: 14.0:1731864230
old_version: 13.8.2:1730993989
public: Public
master_user: #1 admin
is_offline_mode: off
is_offline_mode_constant: off
current_user: #1 admin
tokens_set: Blog User
blog_token: qR#G5#B2af1Gf1PtLe9!a$khjqOtg832
user_token: T#jv3XPwfI&$C9yWhOa!l6fv@s6!EVCf
version: 14.0
jp_plugin_dir: /var/www/vhosts/xyz.com/xyz.com/wp-content/plugins/jetpack/
plan: free
protect_header: {"trusted_header":"REMOTE_ADDR","segments":1,"reverse":false}
full_sync: {"started":"Tue, 06 Aug 2024 15:27:54 +0000","finished":"Tue, 06 Aug 2024 15:28:20 +0000","progress":{"comments":{"total":1,"sent":1,"finished":true,"last_sent":"2"},"constants":{"finished":true},"functions":{"finished":true},"options":{"finished":true},"posts":{"total":508,"sent":508,"finished":true,"last_sent":"2"},"term_relationships":{"total":87,"sent":87,"finished":true,"last_sent":{"object_id":"9","term_taxonomy_id":"2"}},"terms":{"total":35,"sent":35,"finished":true,"last_sent":"1"},"themes":{"finished":true},"updates":{"finished":true},"users":{"total":2,"sent":2,"finished":true,"last_sent":"1"}},"config":{"comments":1,"constants":1,"functions":1,"options":1,"posts":1,"term_relationships":1,"terms":1,"themes":1,"updates":1,"users":1}}
sync_size: undefined
sync_lag: 0 seconds
full_sync_size: undefined
full_sync_lag: 0 seconds
idc_urls: {"home":"https:\/\/www.xyz.com","siteurl":"https:\/\/www.xyz.com","WP_HOME":"","WP_SITEURL":""}
idc_error_option: false
idc_optin: true
cxn_tests: All Pass. learndash
version: 4.18.1
last_updated: 1731085616
previous_version: 4.15.2
license_validated: true
course_count: 6
group_count: undefined
lesson_count: 56
topic_count: undefined
quiz_count: 18
question_count: 28
exam_count: undefined
certificate_count: undefined
shared_course_steps: true
active_template: ld30
focus_mode: true
rtl: false
registration_page: false
currency: USD
nested_urls: true
payment_gateway_paypal_ipn: false
payment_gateway_stripe_connect: false
payment_gateway_razorpay: false
course_using_free_form_progression_count: undefined
course_using_linear_progression_count: 6
lesson_using_video_progression_count: 10
lesson_using_drip_content_count: undefined
topic_using_drip_content_count: undefined
quiz_using_randomized_question_ordering_count: undefined
enrolled_user_count: 2
LEARNDASH_DEBUG: false
LEARNDASH_SCRIPT_DEBUG: false
]]>
Message appears: “There has been a critical error on this website.”
]]>Hello, I got this problem where editors are able to login as administrator. I don’t want that.
i understand that is not the default behavior, so I think my editors must have some capability the plugin uses to determine if someone is admin?
Resolved: My editors had some sort of crazy capabilities (I don’t know why) I removed those and the problem went away.
Hello,
Since the last update (v1.5.4) we are unable to login as a different user.
PHP message: PHP Warning: Undefined variable $login_as_user_options in /wp-content/plugins/login-as-user/includes/class-w357-login-as-user.php on line 667
Version PHP 8.2.24
Is this a bug or something else needed?
]]>Hi @yiannistaos,
Thank you for this plugin. It’s super simple to use!
I have one request, can you please remove enqueuing the CSS and JavaScript code if no one is logged into the website?
Currently, I’m using this code to achieve it:
add_action('wp_enqueue_scripts', function() {
if(!is_user_logged_in()) {
wp_dequeue_style('login-as-user');
wp_dequeue_script('login-as-user');
}
}, 999);
Thanks!
Sully
Hello I am trying to login as user but I get error “Could not login as user.” for all users, it was working perfect previously.
]]>login as user wordpress plugin covering half of the mobile screen when logged-in as user.
]]>My Client uses this app to login as their customers (over the phone) and create orders for them. They’ve found a customer who when you login as that user, there’s 2 items in the basket, if you click the basket, it says it’s empty, and they’re no longer logged in as them, or anyone.
I’ve investigated for them, and it seems to be the same for any customer who’s email isn’t validated, you can go so many pages as them, but if you go to the basket, it logs them out?
Any advice on how to fix this would be greatly appreciated.
]]>I have a number of sites with this plugin installed and they work without a hitch. But on this site it won’t log any one in.
]]>Hi,
Thanks for this awesome tool. With it i can wonderfully log in as any user, but when I click on “go back to admin as..” I get a 404 not found page. It does not give correct URL.
https://example.com/edu/edu/wp-admin/users.php?logged_in_as_user=true
It doubles the site directory, [edu], in my situation {example.com/edu}.
The supposed given URL is:
https://example.com/edu/wp-admin/users.php?logged_in_as_user=true
Please help, if you can.
Best Regards
]]>First off I think the plugin is great and work exactly as advertised, so not complaining but it is important.
Our webshop is using WP Rocket for our logged in users with great benefit on archive pages. Unfortunately, our users are reporting (and have confirmed), that the “Logged-in-as-user-bar” gets cached. How can we avoid this?
(worth noting that they obviously can’t use the “back to as admin”-button)
If a paid version could solve this issue, I would buy a license on the spot.
Thanks for a great plugin!
The requested URL /wp-login.php?action=switch_to_user&user_id=681&nr=1&_wpnonce=0b504158f6 was not found on this server.
I use WPCerber as security if that has anything to do with the problem.
This plugin used to work with Wordfence, but after installing WPCerber I get the above error, when trying to switch to a user.
i don’t know why when i see the site as user with author role get_delete_post_link() shows me a working link nonce to delete
like
/wp-admin/post.php?post=2040&action=trash&_wpnonce=28281ea73c
But when he logs in with his account he sees:
/?post_type=translations&p=2040
So the links are different when they should be the same.
I edited the author capabilities an enabled “delete_posts”.
Is there anything else i have to give them to be able to delete drafts? (post is a draft) i thought delete_posts was it?
Thanks!
]]>Hi there!
The Login as… button link contains several parameters:
action
user_id
back_url
wpnonce
But, after clicked, I just end on the frontpage, and the user is not switched.
Any ideas? Thank you ??
]]>Awesome, and useful little plugin guys. Thank you.
But, I’m not sure if you’re aware of this bug. We call it the “Login Lucky Dip”.
If you are logged in as another user, and that user comes along and tries to log in too, they get logged into some other random user’s account.
This is a very concerning phenomenon, especially when that other user may have all kinds of personal info in there that you would not want someone else to have access to.
You may wish to test this and resolve the issue.
]]>Testing out this plugin but finding an issue with the checkout and cart process. We have some custom calculations and are using a wallet system (terra wallet) as a points system. Users can redeem their points against items and bill their credit card if they don’t have enough points. This is complicated in the woocommerce system since a change in address can change shipping and/or taxes calculations so the checkout is always recalculating. When “Logged In As” a user our custom checkout process is not followed. I’m guessing this is a timing issue and something gets bypassed when using this plugin. Any suggestions?
]]>Absolutely love the plugin. However, in login-as-users.php, line 142, the text-domain is wrong. The line should read:
_e('You are logged in as ', 'gwslau_login_as_user');
Instead of:
_e('You are logged in as ', 'w');
]]>
We just installed PHP 8.2 on our WordPress 6.2.2 site and saw this deprecation warning:
Deprecated: Creation of dynamic property LoginAsUser_Admin::$plugin_name_clean is deprecated in /app/wp-content/plugins/login-as-user/admin/class-admin.php on line 51
Any plans on fully supporting PHP 8.2 soon?
]]>On some sites, the Switch Back bar covers the top navigation. On others it’s behimd the vav bar. Either way it’s very dificult to gat acess to wither the menus or the back button!
In the link field I addedd a link to DropBox with threen shots. Also if it matters, all code is up to date and we uswe the Divi Theme on all websites.
]]>We use WooCommerce, and I need to give an employee the ability to log in as Customers — but I don’t want them to be able to log in as users with a higher privilege, like Editors.
I’ve granted them access to List Users and Edit Users (following this tutorial)… so they can now Login as User. But that lets them log in as any user, which effectively gives them Editor (or maybe even Admin) permissions.
How can I exclude them from being able to log in to specific accounts, or those with a higher privilege than theirs? I’d be fine with excluding specific accounts by ID (rather than by role), if necessary.
Thanks!
]]>It seems this plugin is not up to date with the latest version of WordPress and does not work with the recent version. When can we expect an update?
]]>How can we give the Shop Manager role the ability to “Login as,,,” we hand over roles to shop managers to run the stores but don’t want them to have admin access, but of course they can’t manage shop orders etc as a customer unless they are admin
]]>I’m using ‘Login as user’ to troubleshoot specific account issues. The website is all behind a wordpress login screen, there is no public access. Normally, when choosing ‘login as’ I end up on the home page as per the settings, I see the plugin message bar at the top of the page, and the plugin behaves as expected. With a handful of users I arrive at the normal website login page. If I log in with admin creds I’m just back in as my user, not as the other one. Repeating the action gets the same result for the same user. There is no obvious difference between the users that I can see as to why it works for some, and not others.
The failing users are not administrators, but have various combinations of capabilities.
Please advise as to how to debug this.
Thanks
]]>Please tell me how to remove the column in the orders that the plugin creates with advertising for the transition to the pro version. This prevents our managers from wasting space for other data. Thanks.
]]>I purchased the PRO version of Login As User and am using the shortcode to have a login link placed in a custom admin dashboard page. I am using it as such:[login_as_user user_id="123"]
It works as expected, but it always ends up redirecting back to the website’s home page. I was wondering if I could pass in an additional parameter to redirect to a different page upon login? Perhaps something like this:[login_as_user user_id="123" redirect_to="https://mypreferred.com/page/"]
I also tried another approach, which is to force inject to the end of the generated login button’s href attribute an “&redirect_to=https://mypreferred.com/page/” (escape slashed properly), but that also didn’t work.
]]>Hello,
I am have login as user on my live website, I am using wps hide login (not sure if this is conflicting) but when I log in as user I am getting 502 Bad Gateway.
Please could someone look into this.
CHeers
David
]]>I have had this plugin for years and it has been great. Now without any notice, I am given a notice that in order to utilize the same features I have been using for years, I have to upgrade to pro!
Very disappointed.
]]>This plugin has always worked for me, however since a latter update, when I login to another account via this plugin the CSS is relatively broken. Any ideas about that?
]]>When I log in as a user & then click “log back in as admin” the site switches to the insecure https:// version and logs me out. How do I prevent this?
]]>