On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I’d like to store up to three IP addresses in the Allowed IP Address field for each user, so that they can login from up to three different locations but no others (so they don’t share their login details with everyone else in the company - it’s a paid service).

    My coding skills are terrible, but I guess I need the code to check against the field to see if the existing IP address matches the one stored, and if so, do nothing, and if not, check how many characters are stored in the Allowed IP Address field, and if under 51 (allowing for commas between IP addresses), append a comma and the IP address, and if over 51, provide a message to say they need to get in touch with the company.

    Has anyone else implemented something like this?
    • It would be better to make a plugin to check the allowed IP address field and deny the login if it’s not allowed. No need to hack the MODx code.
        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
      • Yes, via a plugin...of course...still no idea how to code it.