Modifying a configuration string 'live'.
Posted: 23 Aug 2019, 06:13
I'm working on a feature to allow emails to be easily turned on and off. As an administrator sometimes I need to carry out bulk updates that all team members are aware off - on these occasions I needed to be able to temporarily disable emails in an intuitive way without constantly going into the configuration file.
I'll share my work when completed, but I am wondering what the best way is to set the configuration strings (in this case '$g_enable_email_notification') 'on-the-fly' is? Is there some way that endures through a login session of setting that string to a value other than the one contained in config_inc.php and having it easily revert to the default value on logout?
At the moment I'm using cookies, but I'd need to modify less code if I could manipulate the string value on a per-session basis.
Thanks,
Dan
I'll share my work when completed, but I am wondering what the best way is to set the configuration strings (in this case '$g_enable_email_notification') 'on-the-fly' is? Is there some way that endures through a login session of setting that string to a value other than the one contained in config_inc.php and having it easily revert to the default value on logout?
At the moment I'm using cookies, but I'd need to modify less code if I could manipulate the string value on a per-session basis.
Thanks,
Dan