Making WordPress.org


Ignore:
Timestamp:
04/29/2021 05:36:04 AM (4 years ago)
Author:
dd32
Message:

Login: Swich out the manage_users cap (which doesn't exist) to promote_users which is granted to Administrators on multisite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/admin/ui.php

    r10928 r10933  
    77        'index.php',
    88        'Pending User Registrations', 'Pending User Registrations',
    9         'manage_users',
     9        'promote_users',
    1010        'user-registrations',
    1111        'wporg_login_admin_page'
     
    9090
    9191add_action( 'admin_post_login_resend_email', function() {
    92     if ( ! current_user_can( 'manage_users' ) ) {
     92    if ( ! current_user_can( 'promote_users' ) ) {
    9393        wp_die();
    9494    }
     
    115115
    116116add_action( 'admin_post_login_mark_as_cleared', function() {
    117     if ( ! current_user_can( 'manage_users' ) ) {
     117    if ( ! current_user_can( 'promote_users' ) ) {
    118118        wp_die();
    119119    }
     
    144144
    145145add_action( 'admin_post_login_block', function() {
    146     if ( ! current_user_can( 'manage_users' ) ) {
     146    if ( ! current_user_can( 'promote_users' ) ) {
    147147        wp_die();
    148148    }
     
    174174
    175175add_action( 'admin_post_login_delete', function() {
    176     if ( ! current_user_can( 'manage_users' ) ) {
     176    if ( ! current_user_can( 'promote_users' ) ) {
    177177        wp_die();
    178178    }
     
    200200
    201201add_action( 'admin_post_login_block_account', function() {
    202     if ( ! current_user_can( 'manage_users' ) ) {
     202    if ( ! current_user_can( 'promote_users' ) ) {
    203203        wp_die();
    204204    }
Note: See TracChangeset for help on using the changeset viewer.