Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#22107 closed defect (bug) (fixed)

user_email_used error string is not used anywhere?

Reported by: pavelevap Owned by: SergeyBiryukov
Priority: normal Milestone: 3.6
Component: Multisite Version: 3.0
Severity: normal Keywords: has-patch commit 3.6-early
Cc: Focuses:

Description

During localization I found a string that I could not see anywhere. I could reproduce it only in one situation and that does not make sense (string should not be displayed in this case). Maybe we could remove the whole string and related logic because is obsolete and never used? See attached patch.

Or if I am missing something, this string should be at least improved a little (capital letter).

Attachments (3)

user_email_used.patch​ (1.2 KB ) - added by pavelevap 14 years ago.
22107.patch​ (1.2 KB ) - added by SergeyBiryukov 14 years ago.
Refreshed to remove an empty line
22107.2.patch​ (1.8 KB ) - added by SergeyBiryukov 14 years ago.

Download all attachments as: .zip

Change History (13)

#1 @SergeyBiryukov
14 years ago

  • Component General → Multisite
  • Keywords has-patch added
  • Version trunk → 3.0

Introduced in ​mu:825. Doesn't seem to be used or displayed anywhere.

show_user_form() only displays get_error_message('user_email'), which is set in the next block:
​http://core.trac.wordpress.org/browser/tags/3.4.2/wp-includes/ms-functions.php#L507
​http://core.trac.wordpress.org/browser/tags/3.4.2/wp-signup.php#L134

Last edited 14 years ago by SergeyBiryukov (previous) (diff)

#2 @SergeyBiryukov
14 years ago

  • Milestone Awaiting Review → 3.5

#3 @wpmuguru
14 years ago

patch looks good.

@SergeyBiryukov
14 years ago

Refreshed to remove an empty line

#4 @SergeyBiryukov
14 years ago

  • Keywords commit added

#5 @nacin
14 years ago

  • Keywords 3.6-early added
  • Milestone 3.5 → Future Release

#6 @SergeyBiryukov
14 years ago

  • Milestone Future Release → 3.6

#7 follow-ups: @SergeyBiryukov
14 years ago

Found one more piece of dead code:
​http://core.trac.wordpress.org/browser/tags/3.5.1/wp-signup.php#L139

We don't use 'generic' error code anywhere in core. If a plugin wants to display a custom error message there, signup_extra_fields action can be used for that.

#8 in reply to: ↑ 7 @SergeyBiryukov
14 years ago

Replying to SergeyBiryukov:

Found one more piece of dead code

Introduced in ​mu:543 along with the file itself.

#10 @SergeyBiryukov
14 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 23412:

Remove unused error string. props pavelevap. fixes #22107.

Note: See TracTickets for help on using tickets.