Recent Topics

1 Oct 26, 2006 23:07    

Hi all,

I am wondering if there is a way to set the default log off to go to your default web page when a user logs off instead of going to the log on window.

Raymond

2 Oct 27, 2006 14:37

Yes. Edit inc/MODEL/users/_user.funcs.php and find this section:

function get_user_logout_link( $before = '', $after = '', $link_text = '', $link_title = '#' )
{
        global $htsrv_url, $current_User, $blog;

        if( ! is_logged_in() )
        {
                return false;
        }

        if( $link_text == '' ) $link_text = T_('Logout (%s)');
        if( $link_title == '#' ) $link_title = T_('Logout from your account');

        $r = $before;
        $r .= '<a href="'.$htsrv_url.'login.php?action=logout&amp;redirect_to='.rawurlencode( regenerate_url() ).'" title="'.$link_title.'">';
        $r .= sprintf( $link_text, $current_User->login );
        $r .= '</a>';
        $r .= $after;
        return $r;

Change it so that the line that makes the link looks more like this:

        $r .= '<a href="'.$htsrv_url.'login.php?action=logout&amp;redirect_to='.rawurlencode( 'http://www.yoursite.com' ).'" title="'.$link_title.'">';

3 Oct 28, 2006 03:09

Hey thanks Personman that is just what I wanted.

Raymond

4 Nov 01, 2006 07:51

Ok I tested the site without the code you gave me and by default if you log on as a user and go to look at the blogs and comments and then log off you will get default site. If you log on as a user and go to the back office and then log off you do not get the default site. Instead you get the log on screen. I applied the code you gave me and still have the same issue. Not sure why that doesn't work. Seems like it would. Any other ideas?

Raymond

5 Nov 02, 2006 00:12

Hi raymond3900

You said:

by default if you log on as a user and go to look at the blogs and comments and then log off you will get default site. If you log on as a user and go to the back office and then log off you do not get the default site. Instead you get the log on screen.

Maybe that could answer at least half of your question :D

http://forums.b2evolution.net/viewtopic.php?t=7672


Form is loading...