Hi I am a beginner in codeigniter and I have a question, how to make a screen lock that will turn off after some action such as pressing a button / entering a code. The lock is to be based on the fact that until we do something will appear to us a page that can not be bypassed. in the link an example from modesy
Thank you for any help
CodePudding user response:
Create a session variable locked
$this->session->set_userdata('locked', false);
if(Something == true) {
$this->session->set_userdata('locked', true);
}
Then check if has to be locked:
if($this->session->userdata('locked')){
redirect_to "/install"
}
then after finishing install
$this->session->set_userdata('locked', false);