Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'logout redirect'

Viewing 25 results - 76 through 100 (of 127 total)
  • Author
    Search Results
  • spigot_cs
    Member

    Hi, my name is Laurentiu and I work for Spigot.

    I am here to provide information about how to disable the redirection to http://www.mybrowserbar.com/cgi/errors.cgi. Please take a look here: http://www.spigot.com/network_error_assistant.html and also at http://www.spigot.com/uninstall.html.

    Please contact me from our website http://www.spigot.com/contact.html if you need more help.
    Thank you.

    #119298
    jcampbell120
    Member

    Managed to get it to work. Just creates a simple list, you can edit the css to create a drop down menu etc..

    <ul id="menu-home" class="menu-members">
    <li><a href="#">Members Area</a>
    <ul class="sub-menu-members">
    <?php global $bp;
    if ( is_user_logged_in() == false) {
    
    echo'<li><a>root_domain . '/wp-login.php?redirect_to=' . urlencode( $bp->root_domain ) . '">' . __( 'Log In', 'buddypress' ) . '</a></li>';
    
    if ( bp_get_signup_allowed() == true ) {
    echo'<li><a href="' . bp_get_signup_page(false) . '">' . __( 'Sign Up', 'buddypress' ) . '</a></li>';
    }}
    ?>
    
    <?php
    if ( is_user_logged_in() == true) { ?>
    <li><a href=&quot;profile/">Profile</a></li>
    <li><a href=&quot;messages/">Messages</a></li>
    <li><a href=&quot;Leagues/">Groups</a></li>
    <li><a href=&quot;friends/">Friends</a></li>
    <?php echo'<li><a href="' . wp_logout_url( site_url() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>' ?>
    
    </ul>
    </li>
    </ul>
    #114952
    gregfielding
    Participant

    I had taken the short snip of code from this plugin https://buddypress.org/community/groups/bp-profile-as-homepage/ and I put this in my functions.php:

    `function bp_profile_homepage()
    {
    global $bp;
    if(is_user_logged_in() && bp_is_front_page())
    {
    wp_redirect( $bp->root_domain . ‘/’ . $bp->activity->slug );
    }
    }
    function logout_redirection()
    {
    global $bp;
    $redirect = $bp->root_domain;
    wp_logout_url( $redirect );
    }
    add_action(‘wp’,’bp_profile_homepage’);
    add_action(‘wp_logout’,’logout_redirection’);`

    That redirects users to site.com/activity

    #111964
    chrisreg1
    Member

    Hmm unfortunately, that still did not work. Thanks for all your help thus far guys. Here is how my problem originated:

    I recently transferred my site from the default ”/wordpress/” sub directory to my root directory. Everything works fine in BuddyPress except for the LOGOUT and LOGIN menu options from the BuddyPress menu bar (up at the top).

    Upon looking at the URL that the logout and login tries to redirect to (in the tag), it still thinks it is in the ”/wordpress” subdirectory and the thus results in a Error 404 – Page Not Found problem.

    I’ve search various ways to do this but people have either not have found a solution or seem to not have posted it. I originally thought I could just use the ‘Add All Nav Links to Admin Bar’ plugin (https://buddypress.org/community/groups/add-all-nav-links-to-bp-adminbar/) and hide the Login and Sign Up options but unfortunately the “Log Out” still remains since it is under the ‘My Account’.

    Any help would be much appreciated, thanks.

    #110662

    In reply to: logout redirect?

    Brooker
    Member

    it doesnt work as I want it to work…”For the user not logged in backend, BuddyPress already redirects them to main site on logout”
    it says that Buddypress already redirect to main site on logout.. but mine doesnt.. it goes to wordpress logout first…

    #110657

    In reply to: logout redirect?

    @mercime
    Participant
    #110427
    Marcos Nobre
    Participant

    Nevermind figured out, wp-login.php line 380 $redirect_to = !empty( $_REQUEST ) ? $_REQUEST : ‘index.php?loggedout=true’;

    #108887
    Nahum
    Participant

    @gunju2221 thanks for the response. I almost forgot I do have a plugin in place that is supposed to handle logout redirects, when the logout works I do get taken to the homepage. But like I said, sometimes it is the case where it still appears as though I’m logged in because I can see my avatar and username.

    I just wish I could find something that just logged in and logged out with ease!

    #108881
    Virtuali
    Participant

    I don’t think that would be possible, but, there is always a plugin for everything.

    To achieve what you are talking about, it would require ajax to load 3 pages without re-loading the page? Yeah, the wordpress logout requires the standard wp-login.php?action=logout action, to dump that into an ajax js would be pretty difficult.

    You can see what I am talking about, if you go to your site, and click the “Log Out”, the wp-login.php?action=logout will appear, than redirect to the homepage.

    But it would be still worth checking around! :)

    P.S, if there is a plugin that does this, I would expect it to conflict with alot of other plugins.

    #107446

    What happens if you try adding that onclick action to your BP log out?

    <a id="bp-admin-logout" class="logout" href="http://mysite.com/wp-login.php?action=logout&redirect_to=http%3A%2F%2Fmysite.com&_wpnonce=996ffd0d7e">Log Out</a>

    #107002

    Apologies – missed putting the code in backticks:

    BP-FBConnect function is this:
    <a href="#">Logout of Site & Facebook</a>

    BP Function is:
    <a id="bp-admin-logout" class="logout" href="http://mysite.com/wp-login.php?action=logout&redirect_to=http%3A%2F%2Fmysite.com&_wpnonce=996ffd0d7e">Log Out</a>

    #99211
    aomao
    Participant

    That plugin use this code to show users page.

    `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’);`
    by the way I am testing it in localhost
    maybe that causes problem

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

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