Announcement

Collapse
No announcement yet.

vb2 see if user is logged in

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • vb2 see if user is logged in

    Is it sufficent to test the bbuserid and bbpassword cookie against the user table or is interaction with the session table needed?

    This is for a simple

    if(check cookie against db) {
    //logged in
    } else {
    //not logged in
    }

  • #2
    user table + session table.

    Try sessionhash against the session table, if that fails. bbuserid + bbpassword against the user table.
    Scott MacVicar

    My Blog | Twitter

    Comment


    • #3
      Thanks for your answer, do i only need to check if sessionhash cookie value exists in session table or do i need to check agains userid/host in session table also?

      Comment


      • #4
        sessionhash since the cookie might not always exist if they have cookies disabled.

        Sessionhash will either come from _GET / _POST if its a form or a cookie if they have it.

        I think we do detected automatically to pick the correct variable but I havent looked at vB2 code in about a year now.
        Scott MacVicar

        My Blog | Twitter

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X