WordPress.org

Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #17306


Ignore:
Timestamp:
07/12/11 06:59:50 (4 years ago)
Author:
dd32
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17306

    • Property Keywords has-patch added
  • Ticket #17306 – Description

    initial v2  
    33When writing a plugin using the wpmu_validate_blog_signup filter to replace the existing check, you cannot handle the condition of the blogname being that of an existing user that is not the current logged in user. 
    44e.g. this section of code from the original function: 
     5 
     6{{{ 
    57        if ( username_exists( $blogname ) ) { 
    68                if ( is_object( $user ) == false || ( is_object($user) && ( $user->user_login != $blogname ) ) ) 
    79                        $errors->add( 'blogname', __( 'Sorry, that site is reserved!' ) ); 
    810        } 
    9  
     11}}} 
    1012The original functions should perhaps replace the line: 
    1113$result = array('domain' => $mydomain, 'path' => $path, 'blogname' => $blogname, 'blog_title' => $blog_title, 'errors' => $errors);