Theme My Login
TML disables admin toolbar on profile save (7 posts)

  1. sitegeist
    Posted 2 years ago #

    Just started using TML, version 6.3.9. When users update their profiles, it disables the admin toolbar, even though it doesn't display the option to disable the admin toolbar.

    I tried the development version per an earlier suggestion (http://wordpress.org/support/topic/plugin-theme-my-login-how-to-include-show-toolbar-when-viewing-site-on-custom-profile-page?replies=2) but using that version, it doesn't display the profile edit fields at all.


  2. Diego de Oliveira
    Posted 2 years ago #

    Same thing happening here! I'm currently disabling for subscriber users with show_admin_bar( false ), and allowing the toolbar to show only to an administrator profile. When I update an administrator profile, It updates show_admin_bar_front meta field to false, disabling the admin toolbar.

    To "hack" this behavior and keep show the admin toolbar, we could add this line to my theme-my-login-functions.php:

    add_filter( 'show_admin_bar', '__return_true' );

    This shows the admin toolbar for every single user. In my case, for example, I check if the current user is an administrator and then, return true. This solves the issue for now, but I think that this "bad behavior" should be fixed.

  3. nyghtfalcon
    Posted 2 years ago #

    We are about to go live with a new site using this plugin and we lost the admin bar after updating a test user profile also. We also can't see the button to enable admin bar.......

    I will try the hack.

    Also using 6.3.9

  4. nyghtfalcon
    Posted 2 years ago #

    OK. In 6.3.9, there is no theme-my-login-functions.php. I found the line you were referring to in the themed-profiles.php module.

    I added the line add_filter( 'show_admin_bar', '__return_true' ); after commenting out the line that was there.

    Didn't solve the problem.

  5. nyghtfalcon
    Posted 2 years ago #

    Actually, I just fixed the problem. Here's how to do it:

    1. Edit the theme-my-login.php file.

    2. Search for add_filter( 'show_admin_bar'

    3. Comment out the existing line.

    4. Add this line: add_filter( 'show_admin_bar', '__return_true' );


    6. Re-activate the plugin.

  6. Diego de Oliveira
    Posted 2 years ago #

    Hi, @nyghtfalcon,

    It's good that you could solve it, but you're editing a core file of the plugin, and it isn't a good pratice, because when you update the plugin to a new version, you'll lose your changes.

    About the theme-my-login-functions.php file, it doesn't come with the plugin. It's just a file that you can create to store custom code for it. Check it out the documentation: http://www.jfarthing.com/development/theme-my-login/using-theme-my-login-custom-php/.

    You can create the file with any code that you want, then store it in your plugins directory. Try to do that and check if it works!

  7. nyghtfalcon
    Posted 2 years ago #

    Thank you.

    Also, the correct file name - the one I modified originally - is themed-profiles.php.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Theme My Login
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic