Make WordPress Core


Ignore:
Timestamp:
04/27/2012 11:13:39 PM (14 years ago)
Author:
nacin
Message:

After adding a user, take them back to users.php with an 'Edit user' link in the message.

This removes the (possibly ineffective) search from the redirect, as well as the URL hash that will get covered up by the toolbar.

fixes #19470. props merty and SergeyBiryukov for initial patches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-new.php

    r20332 r20631  
    9999                        $add_user_errors = $user_id;
    100100                } else {
    101                         if ( current_user_can('edit_users') ) {
    102                                 $new_user_login = apply_filters('pre_user_login', sanitize_user(stripslashes($_REQUEST['user_login']), true));
    103                                 $redirect = 'users.php?usersearch='. urlencode($new_user_login) . '&update=add' . '#user-' . $user_id;
    104                         } else {
     101                        if ( current_user_can( 'list_users' ) )
     102                                $redirect = 'users.php?update=add&id=' . $user_id;
     103                        else
    105104                                $redirect = add_query_arg( 'update', 'add', 'user-new.php' );
    106                         }
    107105                        wp_redirect( $redirect );
    108106                        die();
Note: See TracChangeset for help on using the changeset viewer.