Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/18/2011 08:35:34 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Introduce lost password page. Introduce user_login and user_lost_pass template parts. Introduce supporting login and smart login redirect functions. Normalize submit containers across template forms. (@todo: register, activation, and lost password pages)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-user-functions.php

    r2790 r2815  
    11<?php
     2
    23/**
    34 * bbPress User Functions
     
    67 * @subpackage Functions
    78 */
     9
     10/**
     11 * Redirect back to $url when attempting to use the login page
     12 *
     13 * @since bbPress (r2815)
     14 *
     15 * @uses wp_safe_redirect()
     16 * @uses esc_url()
     17 * @param str $url
     18 * @param str $raw_url
     19 * @param obj $user
     20 */
     21function bbp_redirect_login( $url = '', $raw_url = '', $user = '' ) {
     22    if ( !empty( $url ) || !empty( $raw_url ) || is_wp_error( $user ) ) {
     23        if ( empty( $url ) && !empty( $raw_url ) )
     24            $url = $raw_url;
     25
     26        if ( $url == admin_url() )
     27            $url = home_url();
     28
     29        wp_safe_redirect( esc_url( $url ) );
     30        exit;
     31    }
     32}
    833
    934/**
     
    97122}
    98123
    99 /** START - Favorites *********************************************************/
     124/** Favorites *****************************************************************/
    100125
    101126/**
     
    359384}
    360385
    361 /** END - Favorites ***********************************************************/
    362 
    363 /** START - Subscriptions *****************************************************/
     386/** Subscriptions *************************************************************/
    364387
    365388/**
     
    632655}
    633656
    634 /** END - Subscriptions *******************************************************/
    635 
    636 /** START - Edit User *********************************************************/
     657/** Edit **********************************************************************/
    637658
    638659/**
Note: See TracChangeset for help on using the changeset viewer.