Pie Register
Conflict with Theme My Login plugin (7 posts)

  1. cwjordan
    Posted 4 years ago #

    When I have Pie Register version 1.2.9a configured to allow users to pick their own password, and to show the password strength meter, the password strength meter doesn't work if I also have Theme My Login version 6.2.2 active. The symptom is that the password strength meter stays stuck on "Too Short".

    Looking further, when Theme My Login is active the URL's for jquery.js, jquery.color.js, and password-strength-meter.dev.js are wrong, so those files don't get loaded. I believe this is because Theme My Login filters the site_url function. I'm not sure what the right way to fix that is, for the moment I've changed the paths in pie-register.php by hand for those files to make it work.


  2. Jeff Farthing
    Posted 4 years ago #

    TML only changes the site URL if it has wp-login.php in the URL.

  3. cwjordan
    Posted 4 years ago #

    Thanks Jeff. I did not mean to imply that TML is doing something wrong, just that what it does doesn't work with what Pie Register is doing, if Pie Register is configured to use the password strength meter.

    Pie Register and TML both affect the login page, so perhaps conflicts are to be expected? I don't know enough about plugin design to say what should be happening here. My change to the pie-register.php script works for me but would fail in the general case.

  4. Chip
    Posted 3 years ago #

    @ cwjordan: What did you modify exactly to get the password strength meter of Pie Register to work with "Theme my Login"?!

  5. cwjordan
    Posted 3 years ago #

    Chip_88 I changed the pie-register.php script so that where it had paths like:


    I changed them to start one directory higher like so:


    I believe that will break if Theme My Login is _not_ installed, so that's not a good general solution. I'm not sure what the best thing to do is. Here is the complete diff between the original pie-register.php script in Pie Register version 1.2.9a, and my customized version (this also has a fix for https support):

    $ diff pie-register.php pie-register.php.orig
    < /* cwjordan - we want plugin_url to be https if needed so use "plugins_url()" */
    <                       $this->plugin_url = trailingslashit(plugins_url(basename(dirname(__FILE__))));
    >                       $this->plugin_url = trailingslashit(get_option('siteurl')) . 'wp-content/plugins/' . basename(dirname(__FILE__)) .'/';
    <                         if (is_array($rpg)) {
    <                                 foreach ($rpg as $k=>$v) {
    <                                         $rpg[$k] = $this->disable_magic_quotes_gpc($v);
    <                                 }
    <                         } else {
    <                               if (TRUE == function_exists('get_magic_quotes_gpc') && 1 == get_magic_quotes_gpc()){
    <                                       $mqs = strtolower(ini_get('magic_quotes_sybase'));
    <                                       if (TRUE == empty($mqs) || 'off' == $mqs){
    <                                               // we need to do stripslashes on $_GET, $_POST and $_COOKIE
    <                                               $rpg=stripslashes($rpg);
    <                                       }
    <                                       else{
    <                                               // we need to do str_replace("''", "'", ...) on $_GET, $_POST, $_COOKIE
    <                                               $rpg=str_replace("''","'",$rpg);
    <                                       }
    >                       $drf=$rpg;
    >                       if (TRUE == function_exists('get_magic_quotes_gpc') && 1 == get_magic_quotes_gpc()){
    >                               $mqs = strtolower(ini_get('magic_quotes_sybase'));
    >                               if (TRUE == empty($mqs) || 'off' == $mqs){
    >                                       // we need to do stripslashes on $_GET, $_POST and $_COOKIE
    >                                       $rpg=stripslashes($rpg);
    >                               }
    >                               else{
    >                                       // we need to do str_replace("''", "'", ...) on $_GET, $_POST, $_COOKIE
    >                                       $rpg=str_replace("''","'",$rpg);
    >                       }
    >                       //return $drf;
    <                       <script type='text/javascript' src='<?php trailingslashit(get_option('siteurl'));?>../wp-includes/js/jquery/jquery.js?ver=1.7.1'></script>
    >                       <script type='text/javascript' src='<?php trailingslashit(get_option('siteurl'));?>wp-includes/js/jquery/jquery.js?ver=1.7.1'></script>
    < <script type='text/javascript' src='<?php trailingslashit(get_option('siteurl'));?>../wp-includes/js/jquery/jquery.color.js?ver=2.0-4561'></script>
    > <script type='text/javascript' src='<?php trailingslashit(get_option('siteurl'));?>wp-includes/js/jquery/jquery.color.js?ver=2.0-4561'></script>
    < <script type='text/javascript' src='<?php trailingslashit(get_option('siteurl'));?>../wp-admin/js/password-strength-meter.dev.js?ver=20070405'></script>
    > <script type='text/javascript' src='<?php trailingslashit(get_option('siteurl'));?>wp-admin/js/password-strength-meter.dev.js?ver=20070405'></script>
    <                 <script type='text/javascript' src='<?php trailingslashit(get_option('siteurl'));?>../wp-includes/js/jquery/jquery.js?ver=1.2.3'></script>
    >                 <script type='text/javascript' src='<?php trailingslashit(get_option('siteurl'));?>wp-includes/js/jquery/jquery.js?ver=1.2.3'></script>
    < ?>
    > ?>
  6. Chip
    Posted 3 years ago #

    Hey cwjordan!

    Thanks for your answer!

  7. cwjordan
    Posted 3 years ago #

    After I updated from wordpress 3.4.2 to wordpress 3.5.1 the password strength meter broke again. The problem is pie-register.php is looking for password-strength-meter.dev.js which is not there in WordPress 3.5.1, it is password-strength-meter.js instead. After I changed that name in pie-register.php it worked again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic