It looks like you're new here. If you want to get involved, click one of these buttons!
if (Gdn::Session()->UserID === 0) {// user is not logged in}
$Session = Gdn::Session();if ($Session->IsValid()){//user is logged in}
if (Gdn::Session()->IsValid()) { ... }
Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
Comments
if (Gdn::Session()->UserID === 0) {// user is not logged in
}
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •$Session = Gdn::Session();
if ($Session->IsValid()){
//user is logged in
}
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •if (Gdn::Session()->IsValid()) { ... }No need to assign $Session
Vanilla Forums Senior Developer [GitHub, Twitter, About.me]
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •