CI4 Session returns null |
using CodeIgniter [i]version 4[/i] and trying to set a variable in session like
LoginController Code: $session = \Config\Services::session(); and redirecting the user to another page Code: return redirect()->to(base_url() . '/user'); but when tried to get the value of `user_logged_in` it returns `null` UserController Code: $session = \Config\Services::session(); Tried using the native PHP methods, but still the session variable is getting null. Tried to start the session in constructor but it results in error Quote:ini_set(): A session is active. You cannot change the session module's ini settings at this time What would be the problem? Please help. Thanks. |
Welcome Guest, Not a member yet? Register Sign In |