WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #17904, comment 64


Ignore:
Timestamp:
03/13/2017 08:05:22 PM (3 years ago)
Author:
flixos90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17904, comment 64

    initial v1  
    551. `validate_username()`: Will be modified to accept a second parameter `$wp_error = false` to make the function return error objects instead of false. If `is_multisite()`, the function will include the restrictions for multisite (illegal names, minimum and maximum length, illegal logins, all numeric).
    662. `username_exists()`: In addition for what this function currently does, it can accept a second parameter `$check_reserved = true`. If that parameter is true (default), the function also calls `is_username_reserved()` (see below).
    7 3. `is_username_reserved()`: New method that performs the `wp_signups` query for existing username that currently happens in `wpmu_validate_user_signup()`. Returns true/false.
     73. `is_username_reserved()`: New method that, if `is_multisite()`, performs the `wp_signups` query for existing username that currently happens in `wpmu_validate_user_signup()`. On single site there is only a filter that by default returns false. Returns true/false.
    884. `wp_validate_user_login()`: New method that acts as a wrapper calling `validate_username()`, `username_exists()` with second parameter false and `is_username_reserved()`. Returns true/WP_Error.
    99