vb2 see if user is logged in

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • forumet
    New Member
    • May 2006
    • 3

    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
    }
  • Scott MacVicar
    Former vBulletin Developer
    • Dec 2000
    • 13286

    #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

    • forumet
      New Member
      • May 2006
      • 3

      #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

      • Scott MacVicar
        Former vBulletin Developer
        • Dec 2000
        • 13286

        #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...