We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32045
    • 2 Posts
    Hello,

    First let me say thank you to the guys that wrote ModX. I had a play with it yesterday with a view to using it on a clients site and was really impressed how quickly I could convert an existing CSS template into a workable ModX page! Having dabbled with the likes of Mamb, Drupal and Wordpress in the past this system looks and feels much more usable. Mind you it wasn’t all plain sailing because I couldn’t for the life of me get @DOCUMENT binding to work but having read a bit on these forums it would appear others have had the same problem. If anyone knows how I can get this working I’m all ears smiley
    Anyway my question is has anyone created a membership site with ModX and implemented any kind of multiple login prevention? I see that it keeps track of login attempts but there doesn’t appear to be a way of preventing multiple logins.
    I’m wondering if I could write the web users id and session to a separate table and have a snippet checking this info to make sure that id is only logged once. Hmm huh

    Thanks
    • What do you need to accomplish that requires an @DOCUMENT binding? I suspect there’s alternate, easy ways to do the same thing. wink
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 10449
        • 956 Posts
        I think you should be able to accomplish this with somehow logging the IP-address and user-agent.

        If user x is already logged in and wants to login again, trigger some kind of error and halt the process.

        I guess you’d have to write a plugin for this to avoid hacking the core. Check which system events would most likely suit your purpose (third tab when you create or edit a plugin): one or multiple events in the section "Web Access Service Events".
          • 32045
          • 2 Posts
          Quote from: rthrash at Nov 19, 2008, 06:30 PM

          What do you need to accomplish that requires an @DOCUMENT binding? I suspect there’s alternate, easy ways to do the same thing. wink

          I just wanted to include some html into my page but the included html changes per page. Normally in PHP I’d just use an include but I couldn’t see an obvious way to do this with ModX then I followed an example you’d posted on here how to make a flash banner dynamic and I’ve got something working now.

          I have a snippet with:-

          <?php
          include($filename);
          ?>

          then I call the snippet and pass the filename as a var:-

          [!mysnippet? &filename=`myhtml.html`!]

          Quote from: ganeshXL at Nov 19, 2008, 07:28 PM

          I think you should be able to accomplish this with somehow logging the IP-address and user-agent.

          If user x is already logged in and wants to login again, trigger some kind of error and halt the process.

          I guess you’d have to write a plugin for this to avoid hacking the core. Check which system events would most likely suit your purpose (third tab when you create or edit a plugin): one or multiple events in the section "Web Access Service Events".


          Thanks I’ll look into this.