WordPress.org

Make WordPress Core

Ticket #6662: hide_create_user_form.diff

File hide_create_user_form.diff, 365 bytes (added by imwebgefunden, 10 years ago)

Show "Add User" Form only if the current user can create new users

  • users.php

    old new  
    378378?>
    379379
    380380<br class="clear" />
     381<?php if ( current_user_can('create_users') ) { ?>
    381382
    382383<div class="wrap">
    383384<h2 id="add-new-user"><?php _e('Add New User') ?></h2>
     
    452453</div>
    453454
    454455<?php
     456}
    455457break;
    456458
    457459} // end of the $action switch