0
I am working with the codeigniter framework completely separate from the front-end. That is, I run the business rules and send a json to the controller. However, I am doing an authentication to allow whether the user will receive the data or not. Since there is no possibility of using Session, I thought of using a global variable that returns true or false. This way, I can check if the user is logged in, and I have this variable throughout the application. How do I make a global variable in codeigniter?
You can use My_controller, with it you put the check function there. And in your Construct, you call the function. $this->function_name();
– Sr. André Baill
You can post the code of what you tried to do?
– Sr. André Baill
You can use through a class, and make a
public "nome_da_variável"
– riki481
Redis, JWT, database, cookie. Have you tried any of these? Show the authentication you’re doing, make it easy to answer.
– ShutUpMagda