Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

How do i check if a user is already logged ?

edited October 2010 in Vanilla 2.0 - 2.8
How do i check if a user is already logged ? and he has open valid session with my vanilla forum. The GDN_WhosOnline table does not store the session status. Is there some thing called, Idle time out for user?

Comments

  • Options
    if (Gdn::Session()->UserID === 0) { // user is not logged in }
  • Options
    Or ...
    $Session = Gdn::Session(); if ($Session->IsValid()){ //user is logged in }
  • Options
    TimTim Operations Vanilla Staff
    if (Gdn::Session()->IsValid()) { ... }

    No need to assign $Session

    Vanilla Forums COO [GitHub, Twitter, About.me]

Sign In or Register to comment.