WordPress.org

Make WordPress Core

Ticket #6662: ajax_create_users.diff

File ajax_create_users.diff, 381 bytes (added by imwebgefunden, 7 years ago)

Patch for admin-ajax.php to check against "create_users"

  • admin-ajax.php

    old new  
    434434        break; 
    435435case 'add-user' : 
    436436        check_ajax_referer( $action ); 
    437         if ( !current_user_can('edit_users') ) 
     437        if ( !current_user_can('create_users') ) 
    438438                die('-1'); 
    439439        require_once(ABSPATH . WPINC . '/registration.php'); 
    440440        if ( !$user_id = add_user() )