Skip to:
Content
Pages
Categories
Search
Top
Bottom

function bb_auth

Viewing 9 replies - 1 through 9 (of 9 total)

  • kevinjohngallagher
    Member

    @kevinjohngallagher

    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

    @_ck_

    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.


    Ben L.
    Member

    @nightgunner5

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


    Ashfame
    Participant

    @ashfame

    @Ben

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


    Ben L.
    Member

    @nightgunner5

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


    Ashfame
    Participant

    @ashfame

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

    how did you get that?

    @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

    @ashfame

    @nehagoyal

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


    Ben L.
    Member

    @nightgunner5

    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