Skip to:
Content

BuddyPress.org

Changeset 2059 for trunk/bp-core.php


Ignore:
Timestamp:
10/26/2009 07:03:25 PM (15 years ago)
Author:
apeatling
Message:

Merging 1.1 branch updates with trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r2055 r2059  
    15461546
    15471547    /* Make sure account deletion is not disabled */
    1548     if ( ( !(int) get_site_option( 'bp-disable-account-deletion' ) && !is_site_admin() ) )
     1548    if ( ( '' != get_site_option( 'bp-disable-account-deletion' ) || (int) get_site_option( 'bp-disable-account-deletion' ) ) && !is_site_admin() )
    15491549        return false;
    15501550
     
    17161716}
    17171717
     1718/**
     1719 * bp_core_boot_spammer()
     1720 *
     1721 * When a user logs in, check if they have been marked as a spammer. If then simply
     1722 * redirect them to the home page and stop them from logging in.
     1723 *
     1724 * @package BuddyPress Core
     1725 * @param $username The username of the user
     1726 * @uses delete_usermeta() deletes a row from the wp_usermeta table based on meta_key
     1727 */
     1728function bp_core_boot_spammer( $auth_obj, $username ) {
     1729    global $bp;
     1730   
     1731    $user = get_userdatabylogin( $username );
     1732
     1733    if ( (int)$user->spam )
     1734        bp_core_redirect( $bp->root_domain );
     1735}
     1736add_filter( 'authenticate', 'bp_core_boot_spammer', 11, 2 );
    17181737
    17191738/**
Note: See TracChangeset for help on using the changeset viewer.