WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#15456 closed defect (bug) (fixed)

Warnings in wp-admin/user-new

Reported by: PeteMall Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Warnings/Notices Keywords: has-patch
Focuses: Cc:

Description (last modified by ocean90)

  • NOTICE: wp-admin/user-new.php:231 - Undefined variable: new_user_email
  • Notice: wp-admin/user-new.php:20 - Undefined variable: s (PHP 5.3.2 specific)
  • Notice: Undefined property: stdClass::$blogid in wp-includes/ms-functions.php:1390 (add a user without sending mail)

Attachments (3)

user-new-form-updates.diff (4.4 KB) - added by wpdavis 3 years ago.
user-new-changes-updated.diff (4.2 KB) - added by wpdavis 3 years ago.
Removed the existing_user_ variables, as they actually aren't needed
user-new-notices-fix.patch (1.6 KB) - added by wpdavis 3 years ago.
Fixes sprintf to use single quotes, makes sure the user is submitting the multisite form before trying to add a user to the blog to avoid errors.

Download all attachments as: .zip

Change History (11)

comment:1 wpdavis3 years ago

  • Cc wpdavis added

The add user page needs a little bit of work to make it usable — working on a patch right now.

comment:2 wpdavis3 years ago

  • Keywords has-patch added; needs-patch removed

Patch attached.
Summary:
*removed the anchors, as the errors display above them, which is potentially confusing to the user.
*set the vars for adding existing users to blogs to false as default in order to avoid stepping on the other form's toes, filling in the wrong fields and errors when submitting the new user form
*made sure noconfirmation stays checked

wpdavis3 years ago

Removed the existing_user_ variables, as they actually aren't needed

comment:3 ocean903 years ago

  • Component changed from Administration to Warnings/Notices
  • Description modified (diff)
  • Keywords needs-patch added; has-patch removed
  • Summary changed from Warning in wp-admin/user-new to Warnings in wp-admin/user-new

Some other warnings.

comment:4 ryan3 years ago

(In [16518]) Fixes for user-new.php. Props wpdavis. see #15456

wpdavis3 years ago

Fixes sprintf to use single quotes, makes sure the user is submitting the multisite form before trying to add a user to the blog to avoid errors.

comment:5 wpdavis3 years ago

  • Keywords has-patch added; needs-patch removed

Above patch should fix both the errors ocean90 was getting.

comment:6 ryan3 years ago

(In [16527]) Notice fixes for user-new.php. Props wpdavis. see #15456

comment:7 ryan3 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.