Bad UX
-
login as user wordpress plugin covering half of the mobile screen when logged-in as user.
-
Hey @umoekagodman0, 👋🏻
Thank you for your feedback. I want to address the 1-star rating, which seems unfair for this particular issue, as it is largely dependent on your active theme. 😰
Additionally, there is an option in the plugin parameters that allows you to display the toolbar at the top or bottom of your page https://ibb.co/vjbZ2rC.
Could you please send me a screenshot of how it looks on your site? This will help me provide assistance in fixing it with a bit of CSS. 🧑🏻💻
Thank you for your time! 🙏
You can upload a screenshot to a third party site and share the link to that site in reply here.
This site is often recommended but there are others.
Here are the screenshots:
prnt. sc/15qyNNHr6KBI
prnt. sc/OLBp4YVcWMhU
Let me know…
Thanks for the screenshots, @umoekagodman0
Could you please add this CSS code in your theme and let me know about the result, please?
.login-as-user-content { padding: 0 } .login-as-user-msg { display: none; } .button.w357-login-as-user-btn { margin: 10; } .button.w357-login-as-user-btn { position: relative; color: transparent; font-size: 0; } .button.w357-login-as-user-btn::before { content: "\2B05"; /* Unicode for the back arrow icon */ font-size: 24px; color: #000; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
Your css code doesn’t really help, still too much login badge or message. If you must show a notification badge or message, learn from how WordPress displays the admin panel (fixed NOT sticky), it pushes down the page header by calculating and increasing the margin accordingly.
Admins are not like the regular Joe that needs something following them to constantly remind them who they are logged-in as. They know what they are doing.
If I were you, I will have a near zero interference return button, badge or logged-in message that can be reveal or hiding at will, much like Google sticky ad.
Too much talk dear😔
Let me know when you have fixed your plugin.
- This reply was modified 3 months, 3 weeks ago by umoekagodman0.
Hi @umoekagodman0,
Again thanks for your useful feedback.
I’ve tried something different and here is the new screenshot https://prnt.sc/DBgLj_6UiHNZ
Do you like it?You can try it:
File: /wp-content/plugins/login-as-user/includes/class-w357-login-as-user.php
Line: 26
Find:add_filter('wp_head', array($this, 'filter_login_message'), 1);
Replace with:
add_action('admin_bar_menu', array($this, 'login_as_user_link_back_link_on_toolbar'), 999);
In the same file.
After the line 275:public function filter_login_message($message)
Add the function below:public function login_as_user_link_back_link_on_toolbar($wp_admin_bar) { if (is_admin_bar_showing()) { $old_user = $this->get_old_user(); if ($old_user instanceof WP_User) { $link = sprintf( /* Translators: 1: user display name; 2: username; */ __('go back to admin as %1$s (%2$s)', 'login-as-user'), $old_user->display_name, $old_user->user_email ); $url = self::back_url($old_user); if (!empty($_REQUEST['interim-login'])) { $url = add_query_arg(array( 'interim-login' => '1', ), $url); } elseif (!empty($_REQUEST['redirect_to'])) { $url = add_query_arg(array( 'redirect_to' => urlencode(wp_unslash($_REQUEST['redirect_to'])), ), $url); } $current_user = (is_user_logged_in()) ? wp_get_current_user() : null; $current_user_name = sprintf( /* Translators: 1: user display name; 2: username; */ __('%1$s (%2$s)', 'login-as-user'), $current_user->display_name, $current_user->user_login ); // Add a new top-level item with a back arrow icon $args = array( 'id' => 'back_to_dashboard', 'title' => '<span class="back">←</span> Back to Admin', 'href' => esc_url($url), 'meta' => array( 'class' => 'logged-in-successfully', 'title' => sprintf(__('You have been logged in as the user "%1$s"', 'login-as-user'), esc_html__($current_user_name)) ) ); $wp_admin_bar->add_node($args); } } }
Please, let me know about the result.
See the result here (screenshot) https://prnt.sc/DBgLj_6UiHNZ
Apologies🙏for the delayed response dear😔
I really appreciate that you paid attention to my feedback. The latest code snippets you suggested are fine – there’s no login message from my side at all nor a ‘go back as admin’ button. But it ok for me since I can always logout of the user account and login to my admin account anytime. The main thing is the removal of the obstruction that prevented a clear inspection of the user account.
However, I notice that your screenshot, for the desktop version still has a login message? Mine doesn’t but it’s fine.
Thank you
PS.
It is not always advisable to directly edit a plugin, since changes will be overriden in the next update. I’m not sure why you didn’t provide a filter, hookup that should have been implemented in my child theme functions.php in order to be update proof🤔
For this reason, I may not update my review of the plugin until you have released an official update to address what has been raised so far.
- This reply was modified 3 months, 2 weeks ago by umoekagodman0.
Hi @umoekagodman0,
Thank you again for your feedback. While I’m still disappointed with the 1-star review, I appreciate your input.
I’m pleased to announce that in the new version 1.5.1, we have included a new parameter to manage the “Back to Admin” link.
Here are some screenshots showcasing the new features and UX improvements:
Please feel free to test the new version and let me know if everything works fine now.
Thank you once again for your valuable feedback!
Regards,
Yiannis Christodoulou
- You must be logged in to reply to this topic.