Welcome Guest, Not a member yet? Register   Sign In
trying to run function just once
#13

(This post was last modified: 06-22-2021, 07:14 PM by richb201.)

(06-22-2021, 06:58 PM)John_Betong Wrote: @richb202,
> Bringing down the users data from S3 can be time consuming so I want to only do it once per user log in.

Try using session which I assume is already being called when a user logs in.

Thanks John. Do you mean a session variable for the $hasRun? Yes, I can try that. The only issue is that where do I set $_SESSION['RUNONCE']=0? If I set it in my code it will get reset to 0 eveytime _init runs? Can I set it in config.php or another system level file? How about index.php?
proof that an old dog can learn new tricks
Reply


Messages In This Thread
trying to run function just once - by richb201 - 06-21-2021, 09:06 AM
RE: trying to run function just once - by ikesela - 06-21-2021, 07:10 PM
RE: trying to run function just once - by paliz - 06-22-2021, 04:19 AM
RE: trying to run function just once - by richb201 - 06-22-2021, 07:04 PM
RE: trying to run function just once - by craig - 06-23-2021, 03:26 AM
RE: trying to run function just once - by paliz - 06-24-2021, 02:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB