Skip to:
Content

BuddyPress.org

Changeset 2630


Ignore:
Timestamp:
02/08/2010 02:36:39 PM (15 years ago)
Author:
apeatling
Message:

Fixes #1846

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r2624 r2630  
    20442044
    20452045/**
     2046 * bp_core_login_redirect()
     2047 *
     2048 * When a user logs in, always redirect them back to the previous page. NOT the admin area.
     2049 *
     2050 * @package BuddyPress Core
     2051 */
     2052function bp_core_login_redirect() {
     2053    global $bp;
     2054
     2055    if ( false === strpos( wp_get_referer(), 'wp-login.php' ) && empty( $_GET['nr'] ) )
     2056        return wp_get_referer();
     2057
     2058    return $bp->root_domain;
     2059}
     2060add_filter( 'login_redirect', 'bp_core_login_redirect' );
     2061
     2062/**
    20462063 * bp_core_clear_user_object_cache()
    20472064 *
Note: See TracChangeset for help on using the changeset viewer.