Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #60029, comment 8


Ignore:
Timestamp:
04/02/2025 02:03:23 PM (10 months ago)
Author:
roytanck
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #60029, comment 8

    v1 v2  
    99
    1010Edit: 'get_blogs_of_user' could probably be used here? https://developer.wordpress.org/reference/functions/get_blogs_of_user/
     11
     12Edit 2: This seems to work:
     13
     14{{{#!php
     15<?php
     16if ( is_multisite() && ! user_can( $user->ID, 'manage_sites' ) && empty( get_blogs_of_user( $user->ID ) ) ) {
     17        return $error;
     18}
     19}}}
     20
     21However, it would probably make more sense to not show the application password UI at all if passwords can't be created.