Basic question, I am setting a variable (facebook id) in cakephp session if the user is from facebook, if the facebook id is set in the session I want to do different thing. How can I check that?
I am doing something like:
if(isset($this->Session->read("fbid")) && $this->Session->read("fbid") != "")
Is this correct?
Thanks in advance!
The Session Component has a method called check.
if ($this->Session->check('fbid')) {
//fbid exists in session
}
CakePHP manual page on the session component's methods
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With