We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Ok, I’ll need a few days before I can focus down on this, but I’ll leave the ideas simmering in the back of my mind until I get my current task finished. It will be OK with you if it gets released back to the community? Others might find it useful as well.
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 8790
      • 526 Posts
      oh YEs Susan !

      I did not saw your very last reply and wasn’t sure you were on your way, agreeing to developp this thing.

      That’s why David (M) was a little bit angry that I posted both FR and Intl Forum.

      I just wanted to ease the communication as all French forumers - may be - couldn’t read English.

      May be i could be helpful to write down something more precise to guide your futur work ? Of course this addon will be public as I think we all miss such a stuff .

      Thanks again

      Regards

      Eric
        Schtroumpf Grognon - Grouchy Smurf
        ---------------------------------
        Faites pas attention.. - Don't pay attention
        http://www.dzi-neo.net
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Well, I was wrong about something shocked

        It turns out that there IS a "blockedafter" field, it’s a date, but it only shows up when editing an existing user. The save processor already checks for a POST value for that field. So there really isn’t much to do to make use of it.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 8790
          • 526 Posts
          So is there any way to use a custom field (created with WebLoginPE) nammed "lifetime" for instance, and them to check each time a Webuser is login if the date is still valid for him ?
            Schtroumpf Grognon - Grouchy Smurf
            ---------------------------------
            Faites pas attention.. - Don't pay attention
            http://www.dzi-neo.net
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Indeed there is, but you won’t need a custom field. The "blockedafter" field will work just fine. It just needs to get filled in on registration. That means you’ll put a hidden field in your registration form, and use a snippet or something to calculate the blockedafter date. Might even be able to use phx to simply add a specific amount to the current time. I’m not sure what data type that is, if it’s a unix timestamp it’ll be pretty easy. I’m off for a while; be back later.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 10449
              • 956 Posts
              Yep; I already posted a sample query above: http://modxcms.com/forums/index.php/topic,22087.msg136292.html#msg136292

              If every new user is automatically just valid for one month, then you don’t even need a hidden field. Just add something to the webloginpe script, or add your own snippet with $modx->runSnippet(’snippetName’, $params).
                • 6726
                • 7,075 Posts
                [tt]<offtopic>[/tt]

                Quote from: elz64 at Jan 28, 2008, 10:47 AM
                I did not saw your very last reply and wasn’t sure you were on your way, agreeing to developp this thing. That’s why David (M) was a little bit angry that I posted both FR and Intl Forum. I just wanted to ease the communication as all French forumers - may be - couldn’t read English.

                @elz64 : Little "aparté" for the record : I have nothing against posting in french + international forums, as long as you’re clear that you do so, and give a link toward the other thread : the issue was being looked into by french contributors who had no idea things had moved forward on the other side undecided Thus my little clarification, which (btw) didn’t need to be related here (I don’t see the point).

                [tt]</offtopic>[/tt]

                Now back to the topic :

                Quote from: sottwell at Jan 29, 2008, 05:45 AM
                I’m not sure what data type that is, if it’s a unix timestamp it’ll be pretty easy. I’m off for a while; be back later.

                [tt]blockeduntil[/tt] is an int(11) which contains a unix timestamp indeed, which is good news smiley

                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l&#39;outil id
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Once a timestamp is entered into the database, in the blockedafter field, all one needs to do is edit the webloginpe lang files to change the text of the $wlpe_lang[23] item to something nicer like "Your account has expired." This could contain a link to a form to re-register, or request an extension, or whatever.

                  The timestamp will need to either be added manually by an administrator from the Manager once a user account has already been created, or directly added to the database by a webloginpe event handler. The save_webuser.processor expects the date format set by its cute little Javascript calender picker, and converts this to a timestamp. So for this purpose the number of seconds the account will be active needs to be added to a current timestamp and that value directly inserted into the webusers_attributes table.

                  Is something being done with this on the French forum? I don’t want to be duplicating effort on something this simple.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 6726
                    • 7,075 Posts
                    No Susan, nobody is working on it, duplicating efforts is what I was trying to prevent indeed !
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l&#39;outil id
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Ok, if elz64 can let me know how users are registered, and how the date of expiration is arrived at, it shouldn’t be any problem to add this value to the user attributes.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org