Skip to content

Commit

Permalink
Coding Standards: Replace loose comparison in `wpmu_welcome_notificat…
Browse files Browse the repository at this point in the history
…ion()`.

Follow-up to [https://mu.trac.wordpress.org/changeset/543 mu:543].

Props debarghyabanerjee, aristath, poena, afercia, SergeyBiryukov.
Fixes #62283. See #62279.

git-svn-id: https://develop.svn.wordpress.org/trunk@59574 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jan 4, 2025
1 parent 8da02a8 commit 8f6f809
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/wp-includes/ms-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) {
* unless it's the user's own username.
*/
if ( username_exists( $blogname ) ) {
if ( ! is_object( $user ) || ( is_object( $user ) && ( $user->user_login !== $blogname ) ) ) {
if ( ! is_object( $user ) || ( is_object( $user ) && $user->user_login !== $blogname ) ) {
$errors->add( 'blogname', __( 'Sorry, that site is reserved!' ) );
}
}
Expand Down Expand Up @@ -1632,7 +1632,8 @@ function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta
$switched_locale = switch_to_user_locale( $user_id );

$welcome_email = get_site_option( 'welcome_email' );
if ( false == $welcome_email ) {

if ( ! $welcome_email ) {
/* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */
$welcome_email = __(
'Howdy USERNAME,
Expand Down

0 comments on commit 8f6f809

Please sign in to comment.