Make WordPress Core


Ignore:
Timestamp:
07/05/2006 10:00:03 PM (18 years ago)
Author:
ryan
Message:

Use wp_die(). Props filosofo. fixes #2914

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/users.php

    r3928 r3985  
    129129
    130130    if ( !current_user_can('edit_users') )
    131         die(__('You can’t edit users.'));
     131        wp_die(__('You can’t edit users.'));
    132132
    133133    $userids = $_POST['users'];
     
    135135    foreach($userids as $id) {
    136136        if ( ! current_user_can('edit_user', $id) )
    137             die(__('You can’t edit that user.'));
     137            wp_die(__('You can’t edit that user.'));
    138138        // The new role of the current user must also have edit_users caps
    139139        if($id == $current_user->id && !$wp_roles->role_objects[$_POST['new_role']]->has_cap('edit_users')) {
     
    159159
    160160    if ( !current_user_can('delete_users') )
    161         die(__('You can’t delete users.'));
     161        wp_die(__('You can’t delete users.'));
    162162
    163163    $userids = $_POST['users'];
     
    167167    foreach ( (array) $userids as $id) {
    168168        if ( ! current_user_can('delete_user', $id) )
    169             die(__('You can’t delete that user.'));
     169            wp_die(__('You can’t delete that user.'));
    170170
    171171        if($id == $current_user->id) {
     
    253253
    254254    if ( ! current_user_can('create_users') )
    255         die(__('You can’t create users.'));
     255        wp_die(__('You can’t create users.'));
    256256
    257257    $user_id = add_user();
Note: See TracChangeset for help on using the changeset viewer.