Skip to:

Always login

  • Is it possible to let users always have to login each time the visit the forum?

    So if they leave the page/forum they will be auto signed out. When they return or start up their browser and visit the forum, they’ll have to login again.

    Perhaps something with cookies that they will use a cookie for 1 session only?

    Sec, how can I make it so that the users will always see register.php first if they want to login instead of the forum frontpage? (i have an idea about this, using the .htaccess file, but perhaps there are other options)

Viewing 3 replies - 1 through 3 (of 3 total)
  • i think you can do this by overridding the bb_cookie function and replacing it with

    function bb_cookie( $name, $value, $expires = 0 ) {

    if ( bb_get_option( ‘cookiedomain’ ) )

    setcookie( $name, $value, 0, bb_get_option( ‘cookiepath’ ), bb_get_option( ‘cookiedomain’ ) );


    setcookie( $name, $value, 0, bb_get_option( ‘cookiepath’ ) );


    Can this be used as a plugin? The real questions should be: Can you overide normal bbpress functions with a plugin? And if so, how would this plugin look like?

    And can a function like this be added:

    If user logged-in = false -> redirect to login.php (or register.php)

    I think bb_cookie is in pluggable.php, so yes. Just look for wordpress documentation on overwriting functions like this (achieveable through plugins).

    Also easy. :)

    add_action('bb_init', 'chuck_out_lusers');
    function chuck_out_lusers() {
    if( !bb_get_current_user() && bb_get_location != 'login-page' ) {

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