Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'logout redirect'

Viewing 25 results - 76 through 100 (of 115 total)
  • Author
    Search Results
  • #98475
    nit3watch
    Participant

    @shawnyuan ** when user log into your website, user is redirected to his/her profile. ** when user tries to move to homepage, user is redirected to his/her profile. **

    Here’s the BP Profile as Homepage plug-in:

    function bp_profile_homepage()
    {
    global $bp;
    if(is_user_logged_in() && $_SERVER=='/')
    {
    wp_redirect( $bp->loggedin_user->domain );
    }
    }
    function logout_redirection()
    {
    global $bp;
    $redirect = $bp->root_domain;
    wp_logout_url( $redirect );
    }
    add_filter('get_header','bp_profile_homepage',1);
    add_action('wp_logout','logout_redirection');

    #96796

    In reply to: sub domain problem

    emailaya
    Member

    one problem down, 2 new ones:
    now blog.emailaya.com works!
    BUT http://www.emailaya.com/blog doesnt!
    it brings me to a page saying: Page Not Found – The page you were looking for was not found.

    2nd: if i logout the user that is currently logged in im redirected to my homepage! instead of the blog’s homepage “/blog/”

    doubled URL problem was solved through the wp->settings->permalinks

    #95012
    Sofian J. Anom
    Participant

    Now the activity as the home page is working, and the logout button is also displayed after login. Another problem is the blog page/tab can not display the list of blog posts. He even displays a list of blogs because I named the page/tab “Blog”. Login form on the front page also does not work: every time I login always redirected to the wp-login.

    #92409

    In reply to: custom logout redirect

    @mercime
    Participant
    #91287

    In reply to: Error on logout

    @mercime
    Participant
    #90574
    footybible
    Participant

    Thanks @rogercoathup I’m not sure line 368 is the right place though (its currently blank in my login). Here is what my file looks like from line 353 onwards:

    // allow plugins to override the default actions, and to add extra actions if they want
    do_action(‘login_form_’ . $action);

    $http_post = (‘POST’ == $_SERVER);
    switch ($action) {

    case ‘logout’ :
    check_admin_referer(‘log-out’);
    wp_logout();

    $redirect_to = !empty( $_REQUEST ) ? $_REQUEST : ‘wp-login.php?loggedout=true’;
    wp_safe_redirect( $redirect_to );
    exit();

    break;

    case ‘lostpassword’ :
    case ‘retrievepassword’ :
    if ( $http_post ) {
    $errors = retrieve_password();
    if ( !is_wp_error($errors) ) {
    $redirect_to = !empty( $_REQUEST ) ? $_REQUEST : ‘wp-login.php?checkemail=confirm’;
    wp_safe_redirect( $redirect_to );
    exit();
    }
    }

    #86445
    sicksight
    Participant

    @erich73

    You could use this snippet in your functions.php to redirect the user to the homepage: http://pastebin.com/VPfgZZTu
    You could cutomize the code to your wishes!

    #86405
    abcde666
    Participant

    many thanks for your feedback guys !

    Does anyone have an idea of how to do a re-direct ? No clue about that and where to redirect at all ?

    Please help….
    :-)

    #82896
    peterverkooijen
    Participant

    I agree…

    There are login redirect plugins (bpdev-logout-redirect + bp-redirect-to-profile). I’ve integrated them into my theme. User/member management is fatally underdeveloped.

    #78485
    kagliostro
    Member

    Instead for me it’s the only one that works very very well (and I have tried wp-fb-autocnnect, Gygia, simple fb connect, Facebook Connect to Adam Hupp, Faux Facebook Connect -only for comment- and others)!
    The only ones that work (for me) are Gygia (but only if you have a normal WordPress installation) and BP-Facebook connect (there is a very little problem with logout redirect). And more, Bp-Facebook gets also the (facebook) email of user.
    I don’t love its method to work, but it works.

    I have Buddypress 1.2.3 and WordPress 3.0 beta 1 (network installation with subdirectory).
    The very great problem that I have with Bp-Facebook (at the moment) is the incompatibility with WordPress MU Domain Mapping: if my secondary blog mantains subdirectory url, BP-facebook works (too well).
    But if I change a subdirectory url with a primary url (example.com/secondaryblog to secondaryblog.com) it goes crazy.
    And this is a problem!

    I hope Peatling update his plugin!

    #72062
    Brajesh Singh
    Participant

    It will redirect back to home page if you are logged in as a logged in member should not be able to access that page.

    Try to logout and then visit that page.

    #71657
    peterverkooijen
    Participant

    Brajesh Singh’s plugin:

    add_filter("login_redirect","bpdev_redirect_to_profile",10,3);

    function bpdev_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user)
    {
    if(empty($redirect_to_calculated))
    $redirect_to_calculated=admin_url();

    /*if the user is not site admin,redirect to his/her profile*/
    if(!is_site_admin($user->user_login))
    return bp_core_get_user_domain($user->ID );
    else
    return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/

    }

    I put it in bp-custom.php. Probably also works in functions.php.

    He also has this essential logout redirect to homepage plugin. Both should have been default wp/bp behavior imho.

    #64900
    dwdutch
    Participant

    Thanks, David. I’ll pursue these options then let you know what happens.

    As for login, Id like to use the “Login with Ajax” widget because it has a “Forgot password” option and it allows for redirects to custom URL on login and/or logout. I’d like to stay away from the WP screen, if possible.

    In fact, that’s yet another challenge: how to give them access to create Posts without seeing the WP-admin screens — especially since I want any profile changes to be done via BP (so they’ll see their xprofile fields) rather than the more simplistic WP fields. alas… for now, i need to get some of them started and I’ll have to save that battle for another day.

    This blog is for a private group of about 20 people.

    #63376
    Bowe
    Participant

    Sorry for the tripple post.. the correct logout redirection is:

    <?php echo wp_logout_url(site_url() ); ?>

    #63369
    Bowe
    Participant

    Ow and you can solve the logout redirect like this:

    http://themysite.com/wp-login.php?action=logout&redirect_to=http://mysite.com

    :)

    #51775
    peterverkooijen
    Participant

    I’ve copied all code from wp-login.php to a custom wp page in my template called memberlogin.php at mywebsite.com/login. I had to make this edit to make the login form show up at that address:

    require( '././wp-load.php' );

    Unfortunately, the form is broken, so there must be other addresses in the file that require editing…

    EDIT 1: There’s an obvious culprit:

    <form name="lostpasswordform" id="lostpasswordform" action="<?php echo site_url('wp-login.php?action=lostpassword', 'login_post') ?>" method="post">

    Replaced all instances of ‘wp-login.php’ with ‘login’. Will all the code work without the php?

    Yes! Logging in via this form works.

    Unfortunately logging out does NOT work… :-(

    When I try /login?action=logout directly in the browser address bar I get this:

    You are attempting to log out of Your Site

    Do you really want to log out?

    After confirming the message bar says ‘failure noticed’ and I’m redirected to the homepage, still logged-in.

    Apparently those ?actions don’t get taken along with the redirect. The redirect is just a blunt redirect to the /login and there it ends. :-(

    #51043
    Korhan Ekinci
    Participant

    Ok Kunal replace this part:

    <?php
    if ( function_exists('wp_logout_url') ) {
    $logout_link = '/ <a href="' . wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
    } else {
    $logout_link = '/ <a href="' . $bp->root_domain . '/wp-login.php?action=logout&redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
    }

    echo apply_filters( 'bp_logout_link', $logout_link );
    ?>

    With This:

    <a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="Logout">Logout</a>

    And that should solve the logout issue.

    #51039
    Kunal17
    Participant

    I was trying to figure out why the log in form was not showing up at all.

    Replacing

    <?php elseif ( get_option(‘users_can_register’) ) : ?>

    with

    <?php else ://if ( get_option(‘users_can_register’) ) : ?>

    seems to do the trick. Not sure why the get_option code does not work. Do I need to have that check?

    Still trying to figure out how to redirect to the same page on logout.

    #51037
    Kunal17
    Participant

    Korhan,

    I tried the code you provided:

    If I browse to my p2 user blog while logged out, it does not show me anything in the userbar. I would like to provide the user the option to log in from the user blog itself. Is the code supposed to show the BP log in/signup links in the userbar?

    If I browse to my p2 user blog while logged in, it shows the user avatar, member profile link and logout link. If I click the logout link, it takes me to the standard WP login page with the message ‘you are logged out’. Can you suggest a way to have it redirect to the same page on the userblog frontend except with the user logged out?

    I hope I am being clear about my questions. I am a novice at programming so only have a basic understanding of what the code is doing.

    Thanks again for your help.

    #50973
    Korhan Ekinci
    Participant

    For some how the code above did not go through correcty, I will paste the first part again:

    <div id="search-login-bar">

    <?php if ( is_user_logged_in() ) : ?>

    <div id="logout-link">
    <?php bp_loggedinuser_avatar_thumbnail( 20, 20 ) ?> &nbsp;
    <?php bp_loggedinuser_link() ?>
    <?php
    if ( function_exists('wp_logout_url') ) {
    $logout_link = '/ <a href="' . wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
    } else {
    $logout_link = '/ <a href="' . $bp->root_domain . '/wp-login.php?action=logout&redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
    }

    echo apply_filters( 'bp_logout_link', $logout_link );
    ?>

    <?php do_action( 'bp_login_bar_logged_in' ) ?>
    </div>

    <?php elseif ( get_option('users_can_register') ) : ?>

    <form name="login-form" id="login-form" action="<?php echo $bp->root_domain . '/wp-login.php' ?>" method="post">
    <input type="text" name="log" id="user_login" value="<?php _e( 'Username', 'buddypress' ) ?>" onfocus="if (this.value == '<?php _e( 'Username', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Username', 'buddypress' ) ?>';}" />
    <input type="password" name="pwd" id="user_pass" class="input" value="" />

    <input type="checkbox" name="rememberme" id="rememberme" value="forever" title="<?php _e( 'Remember Me', 'buddypress' ) ?>" />

    <input type="submit" name="wp-submit" id="wp-submit" value="<?php _e( 'Log In', 'buddypress' ) ?>"/>
    <input type="button" name="signup-submit" id="signup-submit" value="<?php _e( 'Sign Up', 'buddypress' ) ?>" onclick="location.href='<?php echo bp_signup_page() ?>'" />

    <input type="hidden" name="redirect_to" value="http://<?php echo $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] ?>" />
    <input type="hidden" name="testcookie" value="1" />

    <?php do_action( 'bp_login_bar_logged_out' ) ?>
    </form>
    <?php endif // get_option('users_can_register') ?>

    <div class="clear"></div>
    </div>

    #50972
    Korhan Ekinci
    Participant

    Hi Kunal17, I use prologue theme as default user theme and I also wanted to keep the login form on top, so I added this to the header of the prologue theme:

    <div id=”search-login-bar”>

    <?php if ( is_user_logged_in() ) : ?>

    <div id=”logout-link”>

    <?php bp_loggedinuser_avatar_thumbnail( 20, 20 ) ?>  

    <?php bp_loggedinuser_link() ?>

    <?php

    if ( function_exists(‘wp_logout_url’) ) {

    $logout_link = ‘/ root_domain ) . ‘”>’ . __( ‘Log Out’, ‘buddypress’ ) . ‘‘;

    } else {

    $logout_link = ‘/ root_domain . ‘/wp-login.php?action=logout&redirect_to=’ . $bp->root_domain . ‘”>’ . __( ‘Log Out’, ‘buddypress’ ) . ‘‘;

    }

    echo apply_filters( ‘bp_logout_link’, $logout_link );

    ?>

    <?php do_action( ‘bp_login_bar_logged_in’ ) ?>

    </div>

    <?php elseif ( get_option(‘users_can_register’) ) : ?>

    <form name=”login-form” id=”login-form” action=”<?php echo $bp->root_domain . ‘/wp-login.php’ ?>” method=”post”>

    <input type=”text” name=”log” id=”user_login” value=”<?php _e( ‘Username’, ‘buddypress’ ) ?>” onfocus=”if (this.value == ‘<?php _e( ‘Username’, ‘buddypress’ ) ?>’) {this.value = ”;}” onblur=”if (this.value == ”) {this.value = ‘<?php _e( ‘Username’, ‘buddypress’ ) ?>’;}” />

    <input type=”password” name=”pwd” id=”user_pass” class=”input” value=”” />

    <input type=”checkbox” name=”rememberme” id=”rememberme” value=”forever” title=”<?php _e( ‘Remember Me’, ‘buddypress’ ) ?>” />

    <input type=”submit” name=”wp-submit” id=”wp-submit” value=”<?php _e( ‘Log In’, ‘buddypress’ ) ?>”/>

    <input type=”button” name=”signup-submit” id=”signup-submit” value=”<?php _e( ‘Sign Up’, ‘buddypress’ ) ?>” onclick=”location.href='<?php echo bp_signup_page() ?>'” />

    <input type=”hidden” name=”redirect_to” value=”http://&lt;?php echo $_SERVER[‘SERVER_NAME’] . $_SERVER[‘REQUEST_URI’] ?>” />

    <input type=”hidden” name=”testcookie” value=”1″ />

    <?php do_action( ‘bp_login_bar_logged_out’ ) ?>

    </form>

    <?php endif // get_option(‘users_can_register’) ?>

    <div class=”clear”></div>

    </div>

    You can maybe replace the

    <div id=”search-login-bar”>

    <?php bp_login_bar() ?>

    <div class=”clear”></div>

    </div>

    part of your header.php file with the first code and I hope it will work for you.

    #42589
    vito687
    Participant

    Im having this same logout problem, logout redirects right back to the page where you were and you stay logged in? im on the latest branch of WPMU and latest TRUNK of BP

    #39526

    In reply to: BP-FBConnect Plugin

    clompers
    Member

    The test site is acting a bit odd when I login with my Facebook account. It thinks my profile is http://testbp.org/members/facebookuser/ which belongs to a Trent Adams. Trying to view settings redirects back to http://testbp.org/members/facebookuser/, as does trying to logout through the top grey toolbar.

    I’ve restricted my facebook profile quite a bit so maybe its relying on information facebook isn’t providing.

    #37473
    Sgrunt
    Participant

    i’ve re uploaded just now all bp. Nothing change…i’d like to understand where to modify the logout url, removing the redirect.

    I’ve tried changing the templatetags in bpcore but it sorts no changes.

    note: every time i try to paste the link url here in the forum, the post don’t go published

    #37421
    Sgrunt
    Participant

    no…i don’t understand where to change the redirect url. I’m using the beta 2 version with no trunk mixed in

Viewing 25 results - 76 through 100 (of 115 total)
Skip to toolbar