Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2012 02:29:55 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Remove unneeded globals and clean up some code in Members component. Remove signup file and move its code into screens and functions. See #3989.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-actions.php

    r5410 r5700  
    11<?php
    2 /*******************************************************************************
    3  * Action Functions
     2
     3/**
     4 * BuddyPress Members Actions
    45 *
    56 * Action functions are exactly the same as screen functions, however they do not
    67 * have a template screen associated with them. Usually they will send the user
    78 * back to the default screen after execution.
     9 *
     10 * @package BuddyPress
     11 * @subpackage MembersActions
    812 */
    913
    … …  
    154158 */
    155159function bp_core_get_random_member() {
    156         global $bp;
     160        if ( ! isset( $_GET['random-member'] ) )
     161                return;
    157162
    158         if ( isset( $_GET['random-member'] ) ) {
    159                 $user = bp_core_get_users( array( 'type' => 'random', 'per_page' => 1 ) );
    160                 bp_core_redirect( bp_core_get_user_domain( $user['users'][0]->id ) );
    161         }
     163        $user = bp_core_get_users( array( 'type' => 'random', 'per_page' => 1 ) );
     164        bp_core_redirect( bp_core_get_user_domain( $user['users'][0]->id ) );
    162165}
    163166add_action( 'bp_actions', 'bp_core_get_random_member' );
     167
    164168?>
Note: See TracChangeset for help on using the changeset viewer.