I'm trying to fix an issue with permissions in my app, I have a session->userdata('usrclass') set when login with different account class.
I have an ADMIN user who has a usrclass of ADMIN
and I need to show some content based on that.
BUT when I do this:
<?= ($this->session->userdata('usrclass') == "ADMIN") ? 'yes' : 'no'; ?>
It outputs "no"... While it should output "yes". So I tried reading into the sessiondata with this code:
<?= echo $this->session->userdata('usrclass') ?>
This outputs the word ADMIN
... This is a weird behavior, I've tried using ===
, I've tried to figure out other stuff but couldn't.
What could it be?
I'm going to attach some pics of this: