Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'logout redirect'

Viewing 25 results - 126 through 150 (of 174 total)
  • Author
    Search Results
  • #15097
    nanchante
    Participant

    HIya,

    I am running BP in a /community/ subfolder, within a custom cms system.

    I want to be able to redirect users to / instead of /community/ upon logout…. how can I do this please?

    Many thanks.

    #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.

    peterverkooijen
    Participant

    Is it possible to just integrate code from certain plugins into a custom theme? Plugins like bpdev-logout-redirect or the email login plugin that do something basic/essential and won’t change much.

    What’s the best approach? Just copy the functions to functions.php?

    #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

    :)

    #8800
    shaisimchi
    Participant

    Hi,

    I have recently installed facebook connect on my buddypress installation.

    It is working fine with some issues I hope some of you guys have already solved:

    1) The facebook connect doesnt “bring” with it the user e-mail. I looked at the facebook documentation and it seems that it can be done using ” FB.Connect.showPermissionDialog(“email”); which in turns asks the user to share his e-mail with buddypress – has anyone tried it or knows how to configure?

    2) I would like to control the location of the FBconnect button on the login screen – any idea how I do that?

    3) another thing that started happening after installing FB connect is the fact that when I logout it redirect me to different pages on my site than it used to without the fbconnect. any idea why or how to control it?

    Thanks,

    Shai

    danf-1
    Participant

    Im considering this configuration and wondering if others think its possible or whether I am crazy for trying to do it

    I will be installing wpmu/buddypress on a main domain using subdomain structure – nothing fancy there.

    Most of the subdomain blogs will be typically simple user blogs and act as normal – still good.

    Now, here comes the challenge. I have an existing site hosted on a different domain running normal wp that I want to bring in and move to be a subdomain of the new wpmu/buddypress site. This site is very large database – we are using wp as a CMS and have 60k posts and lots of data in the postmeta, plus I am running some pretty advanced plugins that I have found to cause problems when implemented in wpmu. So, I want don’t think I can (or want) to convert this blog to be an instance of wpmu – I want to keep it as a single wp install.

    This is how I’m thinking of merging the two:

    * Create a clone blog entry in wpmu that will act as the place holder for my single wp subdomain (I can use htacess or special theme here to redirect anyone who finds the clone subdomain to my real subdomain) – This is to generate a blog_id to be used in the single wp database prefix.

    * Create a server-side subdomain in order for my single wp install to resolve correctly and install it in that subdomain folder.

    * In my single wp install – Set CUSTOMER_USER_TABLE and CUSTOMER_USERMETA_TABLE to point to the wpmu usertables – so now all the users will be in the same table and login/logout will go through the wpmu process

    * My single wp install will include the clone blog_id in its prefix in order to have all the capabilities working correctly in the usermeta table

    I **think** this scenario should work.

    Where I think I will run into problems is getting the buddybar to show up on my special domain. One idea I had was to create a custom page on my clone subdomain that just generates the buddybar html code – then include that at the top of my wp single install theme either as a php include or as an iframe. Thoughts on that approach?

    The other question is regarding cookies and how the single install wp could read the wpmu cookies to check to see if logged in – if I just set to the same salt/auth keys as wpmu, and since they are both using same user/usermeta tables, it should work, right?

    Any guidance on this is greatly appreciated before I go down the path of learning out the hard way this won’t work :)

    #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.

    icanpress
    Member

    Hi,

    I’m having a problem with comments. After submitting a comment I’m redirected to the very first post.instead of direct back to the post with the newly posted comment.

    I have deactivated Buddypress and reverted to the original theme — then it works.

    It doesn’t look to be a core problem. More looks like a Buddypress problem.

    Initially I was having a problem where adding a comment just went to a white screen: http://mysite.com/comment-page-/#comment-

    Solution to this was to drop and recreate the comment tables as per: http://wordpress.org/support/topic/249950

    Now I’m having this redirect problem.

    Can someone show me where this redirect takes place? I’d like to see it in the core files to understand better.

    All help appreciated. Is this a known issue?

    edit: additional info:

    WordPress MU 2.7.1

    BuddyPress 1.0

    simple custom theme

    bp-custom has:

    function my_bp_the_site_blog_avatar_thumb()

    function my_alter_bp_adminbar()

    function my_logout_display()

    function ftblg_bp_timezone_bug($activity)

    function my_alter_bp_adminbar_blogs_menu()

    function my_bp_core_widget_members($args)

    function my_bp_core_widget_members_control()

    #5551
    #4607
    enlightenmental1
    Participant

    is anyone running

    WPMU 2.7.1

    BP RC2

    FBconnect

    and does it work?

    I’m getting a redirect loop… user logs out, then the page refreshes and the user is logged back in, top right username/logout shows only “avatar and logout”, doesnt show “username, log out of site / facebook” (this is the same when logging in normally as well….?)

    (we’ve modified the plugin to grab a $session variable and put it in a hidden xprofile field… so we may have broken it? but this wasn’t happening before RC2/2.7.1)

    I dunno…. any thoughts?

Viewing 25 results - 126 through 150 (of 174 total)
Skip to toolbar