WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11746 closed defect (bug) (fixed)

deprecate generate_random_password()

Reported by: Denis-de-Bernardy Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Multisite Keywords: has-patch needs-testing
Focuses: Cc:

Description

WP has a wp_generate_password() function, which we should use instead.

Attachments (4)

11746.diff (2.7 KB) - added by ryan 4 years ago.
Untested
11746.2.diff (1.2 KB) - added by nacin 4 years ago.
Some inline docs added as well.
11746.3.diff (1.2 KB) - added by nacin 4 years ago.
Little better inline documentation
random_password.diff (393 bytes) - added by uglyrobot 4 years ago.
I know the function is pluggable, but can we keep the random_password filter? We use it.

Download all attachments as: .zip

Change History (13)

comment:1 Denis-de-Bernardy4 years ago

atm, it's used in ms-edit.php and ms-functions,php

ryan4 years ago

Untested

comment:2 ryan4 years ago

  • Keywords has-patch needs-testing added

comment:3 ryan4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12624]) Deprecate generate_random_password(). fixes #11746

comment:4 nacin4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

There's a spelling mistake in the third argument of the _deprecated_functon call.

nacin4 years ago

Some inline docs added as well.

nacin4 years ago

Little better inline documentation

comment:5 westi4 years ago

Docs look good.
I'm wondering why we are preserving the exact functionality of this function can't we just use the function we recommend in this function like we do for other deprecated functions.

comment:6 westi4 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [12635]) phpDoc for ms-deprecated.php props nacin.
Make generate_random_password use wp_generate_password()
Fixes #11746.

uglyrobot4 years ago

I know the function is pluggable, but can we keep the random_password filter? We use it.

comment:7 uglyrobot4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Add filter

comment:9 Denis-de-Bernardy4 years ago

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