We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8489
    • 90 Posts
    The "Remember me" option from webloginpe is not working

    In the template I use:

    [!WebLoginPE? &lang=`nl` &loginFormTpl=`WebLoginPE-NL` &regType=`verify` &groups=`NL-Prijslijst`!]

    and in the chunk named "WebLoginPE-NL" I use a checkbox instead of the select:

    <input type="checkbox" id="remember" name="rememberme" value="315569260" /><label for="remember">Onthouden?</label>

    Can some one help me with this?

    Kind regards,
    Edski
      • 8454
      • 55 Posts
      I know this is an old post but I am struggling with a similar problem. No cookie is set when checking this box
      <fieldset id="wlpeLoginFieldset">
      			<label id="wlpeUsernameLabel" for="wlpeUsername">Username
      				<input id="wlpeUsername" type="text" name="username" />
      			</label>
      			
      			<label id="wlpePasswordLabel" for="wlpePassword">Password
      				<input id="wlpePassword" type="password" name="password" />
      			</label>
      			
      			<label id="wlpeRememberMeLabel" for="wlpeRememberMe">Remember me
      				<input type="checkbox" id="wlpeRememberMe" name="rememberme" value="315569260" />
      			</label>	
      		</fieldset>


      Did you Edski solve this? Anyone else?

      (MODx 0.9.6.3, WebLoginPE 1.3.1, MAMP on MacOS 10.5.6, Firefox 3.0.10)
        • 23217
        • 44 Posts
        Not sure if you ever got an answer. I ran into the same problem. What I found is in webloginpe.class.php about line 2240 and following, replacing
        setcookie($cookieName, $cookieValue, $cookieExpires, ’/’, $_SERVER[’SERVER_NAME’], 0);
        WITH
        setcookie($cookieName, $cookieValue, $cookieExpires);//, ’/’, $_SERVER[’SERVER_NAME’], 0);

        Made everything happier. I do not know the implications of not setting the path, domain, and such (though since they get defaulted, I would tend to trust the defaults).
          • 15557
          • 6 Posts
          i have two lines like that

          if ($_POST[’rememberme’] == ’on’)
          {
          $cookieName = ’WebLoginPE’;
          $cookieValue = md5($this->User[’username’]).’|’.$this->User[’password’];
          $cookieExpires = time() + (60 * 60 * 24 * 365 * 5); //5 years

          setcookie($cookieName, $cookieValue, $cookieExpires, ’/’, $_SERVER[’SERVER_NAME’], 0);
          }

          if (isset($_POST[’stayloggedin’]) && $_POST[’stayloggedin’] !== ’’)
          {
          $cookieName = ’WebLoginPE’;
          $cookieValue = md5($this->User[’username’]).’|’.$this->User[’password’];
          $cookieExpires = time() + $_POST[’stayloggedin’];

          setcookie($cookieName, $cookieValue, $cookieExpires, ’/’, $_SERVER[’SERVER_NAME’], 0);
          }

          unfortunly its still not work sad i cant find any help about that.

          any ideas?
            • 3749
            • 24,544 Posts
            There is currently work going on to fix the known bugs in WLPE and get a new version out for the repository. I’m not involved in it, but I know it’s happening.

            I just wanted to let people know that WLPE is not dead yet. smiley
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 34162
              • 1 Posts
              BOB ...

              Thank you very much indeed for the update. These little notes can sooth al lot when known!!

              Can’t wait for ... and - if anyone would like to help me out (in exchange for reimbursement - I’d really love to get help because as a newbee I am absolutely stuck) huh
                • 1169
                • 312 Posts
                Hi

                My name is Allan

                I have been working on WLPE to try and get things moving. I have been collecting together various updates and trying to bring then together to see if it will all work together.
                I am by no stretch of the imagination an expert in this like you I am quit new to all this but do have some skills which I am trying to use for this project. At present I am not able to sort out you problem as I am not fully conversant of what does what. This is a relatevely large codebase written in OOP PHP by in general one man who did a great job. Unfortunately he was not able to devote time to the project in the last few years and various people in very good faith have tried to fix problems as they are able.

                I have just finished incorperating bug fixes and improvements on the google code site.
                I am now trying to fix XHTML validation errors.
                I am hoping to learn the code a little better as I go along.

                I have seen your problem but am not in a position to help at present (lack of knowlege).

                I hope someone out there is able to help.
                I do understand your frustration I have been there myself.

                My typing speed is slow amd I don’t know how to ask the questions.
                  DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31
                  • 3749
                  • 24,544 Posts
                  Quote from: phayes at Oct 14, 2009, 09:34 PM

                  Not sure if you ever got an answer. I ran into the same problem. What I found is in webloginpe.class.php about line 2240 and following, replacing
                  setcookie($cookieName, $cookieValue, $cookieExpires, ’/’, $_SERVER[’SERVER_NAME’], 0);
                  WITH
                  setcookie($cookieName, $cookieValue, $cookieExpires);//, ’/’, $_SERVER[’SERVER_NAME’], 0);

                  Made everything happier. I do not know the implications of not setting the path, domain, and such (though since they get defaulted, I would tend to trust the defaults).


                  The path defaults to the current subdirectory, and setting it to ’/’ shouldn’t cause any problems. The much more likely culprit is $_SERVER[’SERVER_NAME’]. If you come in to www.yoursite.com when the cookis is set and come back by going to yoursite.com, the cookie won’t be readable. Similarly, if $_SERVER[’SERVER_NAME’] is blank or wrong it could make the cookie unreadable.

                  I would try this:

                      setcookie($cookieName, $cookieValue, $cookieExpires, '/');


                  BTW, there’s code in .htaccess that you can uncomment to force the addition or removal of the ".www" prefix.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 23510
                    • 168 Posts
                    I have a form using two custom fields - one radio group, and one checkbox and neither of them hold their values upon return from submitting (if something was left out). I have triple checked my code.

                    The only option now is to use jquery to make sure everything is entered before submitting, but still it is not foolproof.

                    Does anyone have a later beta of this with the bugfixes or should I just do the entire Register form over in eform or (gasp) a plain HTML form?

                    I’m wondering how some of the other MODx sites handle this. What I need done is not overly complex.

                    Running Evo 1.04, webloginpe v1.3.1 Bugfix by Soshite.