Skip to:
Content
Pages
Categories
Search
Top
Bottom

function bb_auth

  • @nehagoyal

    Member

    for what purpose the function bb_auth is used and what value is passed to argument $scheme

Viewing 9 replies - 1 through 9 (of 9 total)
  • @kevinjohngallagher

    Member
    function bb_auth( $scheme = 'auth' )
    { // Checks if a user has a valid cookie, if not redirects them to the main page
    }

    I’m guessing it “Checks if a user has a valid cookie, if not redirects them to the main page”

    First link on google

    @_ck_

    Participant

    1.x supports SSL so scheme can also be for SSL ‘secure_auth’

    I guess the idea is to use a different cookie than the one exposed via http.

    @nightgunner5

    Member

    There’s also bb_auth( 'logged_in' ) if you aren’t checking if the user can be in bb-admin.

    @ashfame

    Participant

    @Ben

    Didn’t get your point. I can’t see that in file either functions.bb-pluggable.php

    @nightgunner5

    Member

    bb_auth() can be called with 'logged_in' as the $scheme to check if a user is logged in.

    @ashfame

    Participant

    but there is nothing in the function definition for an argument 'logged-in'

    how did you get that?

    @nehagoyal

    Member

    @ashfame

    in the function bb_salt($scheme), there are 4 cases for the variable $scheme one of which checks for the value ‘logged_in’ (all are auth, secure_auth, logged_in, nonce)

    @ashfame

    Participant

    @nehagoyal

    and we are talking of bb_auth() here. Aren’t we?

    @nightgunner5

    Member

    bb_auth calls bb_validate_auth_cookie, which calls WP_Auth::validate_auth_cookie, which uses a variable defined in bb-settings.php. The cookies you can check for are auth and logged_in, with auth automatically switching to secure_auth if you’re on SSL.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar