10-10-2018, 10:05 AM
Hi @mcharlesworth
Sorry for the slow response. This one took a bit of coding. I basically just made you an example that you can modify as needed.
This is patch.php - it goes in your root and gets run once. It adds the needed column to your users table and adds a sample log table.
https://pastebin.com/TUByXJRC
The contents of this file go in usersc/includes/head_tags.php
https://pastebin.com/BDbKwFs8
Note that this is what deals with seeing if it's been too long and they need to reup their location. I have it currently set to 2 mins, but you can change it as needed.
You can also do all sort of checks in there, like if you don't want admins to do it, you can do something like
if (!hasPerm([2],$user->data()->id)){ //around the whole thing
Finally is location.php, which is where they get redirected to update their info. You'll obviously have to personalize that however you want it, I just got the form working so you can see what needs to happen.
This is location.php
https://pastebin.com/EMgPveeE
Hope that helps.
Sorry for the slow response. This one took a bit of coding. I basically just made you an example that you can modify as needed.
This is patch.php - it goes in your root and gets run once. It adds the needed column to your users table and adds a sample log table.
https://pastebin.com/TUByXJRC
The contents of this file go in usersc/includes/head_tags.php
https://pastebin.com/BDbKwFs8
Note that this is what deals with seeing if it's been too long and they need to reup their location. I have it currently set to 2 mins, but you can change it as needed.
You can also do all sort of checks in there, like if you don't want admins to do it, you can do something like
if (!hasPerm([2],$user->data()->id)){ //around the whole thing
Finally is location.php, which is where they get redirected to update their info. You'll obviously have to personalize that however you want it, I just got the form working so you can see what needs to happen.
This is location.php
https://pastebin.com/EMgPveeE
Hope that helps.