Make WordPress Core

Opened 16 years ago

Closed 11 years ago

Last modified 11 years ago

#8296 closed enhancement (duplicate)

Auto generate password for new user

Reported by: aaroncampbell's profile AaronCampbell Owned by: jamierumbelow's profile jamierumbelow
Milestone: Priority: normal
Severity: normal Version:
Component: Users Keywords:
Focuses: Cc:

Description

It would be nice to have a button that generates a random password to use when you're creating a new user account in the admin section

Attachments (4)

8296.diff (2.0 KB) - added by solarissmoke 14 years ago.
8296-1.diff (1.7 KB) - added by ericlewis 12 years ago.
Updated version of solarissmoke's implementation, as the current doesn't apply cleanly. Remove AJAX dependency.
8296.2.diff (3.1 KB) - added by SergeyBiryukov 12 years ago.
8296.2.png (13.5 KB) - added by SergeyBiryukov 12 years ago.

Download all attachments as: .zip

Change History (29)

#1 @jamierumbelow
16 years ago

  • Owner changed from anonymous to jamierumbelow

Good idea - I'll write a patch.

#2 @FFEMTcJ
16 years ago

  • Milestone changed from 2.8 to Future Release

#5 @Denis-de-Bernardy
15 years ago

  • Component changed from Administration to Users

#6 @cnorris23
15 years ago

  • Cc cnorris23+wordpress@… added

@solarissmoke
14 years ago

#8 @solarissmoke
14 years ago

  • Keywords has-patch added; needs-patch removed

Patch adds a "generate random password" button to the add user section.

It uses ajax to call wp_generate_password(). We could quite easily generate a password with JS only, but I figured that we should allow the filter in wp_generate_password() to be applied. Open to other opinions however.

#9 @solarissmoke
14 years ago

PS I haven't added the password generator to user-edit.php on the basis that you would typically want something random only when it is going to be emailed to the user for first use.

Adding a random password generator to user-edit.php feels like asking for trouble, because you just know someone will hit "update" without taking note of the random password.

#10 @nacin
14 years ago

#9210 has a JS version of wp_generate_password() from sivel.

#11 follow-up: @westi
14 years ago

Why not just have a check box to send a random password to the user - no need for js or anything?

#12 @solarissmoke
14 years ago

  • Keywords has-patch removed

That makes sense. Would it be going too far to just remove the manual password altogether and force a random password?

#13 @aaroncampbell
14 years ago

I'd be happy with "Leave blank to have a password randomly generated" although that doesn't make a lot of sense unless you've also checked the box to "Send this password to the new user by email."

#14 @billerickson
13 years ago

  • Cc bill.erickson@… added

#15 @williamsba1
12 years ago

  • Cc brad@… added

#16 in reply to: ↑ 11 @ericlewis
12 years ago

Replying to westi:

Why not just have a check box to send a random password to the user - no need for js or anything?

Is there a large enough user population that has JS disabled, so things like this should be baked into PHP where possible?

The JS fix seems like it would fit in best as far as UX goes.

Last edited 12 years ago by ericlewis (previous) (diff)

@ericlewis
12 years ago

Updated version of solarissmoke's implementation, as the current doesn't apply cleanly. Remove AJAX dependency.

#17 @aaroncampbell
12 years ago

  • Cc aaroncampbell added

I definitely like the first patch better (even if it needs a refresh). Using wp_generate_password() which allows filtering makes this more useful (especially on enterprise sites with specific password requirements)

#18 @SergeyBiryukov
12 years ago

8296.2.diff is the refreshed AJAX implementation. "Send this password to the new user by email" is checked automatically when the button is pressed.

Screenshot: 8296.2.png

#19 @williamsba1
12 years ago

I'd love a way to see the password that was generated. There are many occasions when I'm creating accounts for users and I need a record of the password on their account.

#20 @billerickson
12 years ago

+1 to Brad's comment. Having the ability to view the randomly generated password when created is definitely useful.

When I send a site to a client for review, I create their user, give it a random password, and email their login information along with a lot of other information.

#21 @williamsba1
12 years ago

A good UI example of this is the cPanel password generator. A simple lightbox opens when you click to generate a password shown here:

http://docs.cpanel.net/twiki/bin/view/11_30/CpanelDocs/PasswordGenerator

#22 @wedi
11 years ago

Right now I'm using this plugin which does it's job great.
http://wordpress.org/plugins/simple-user-password-generator/

Last edited 11 years ago by wedi (previous) (diff)

#23 @helen
11 years ago

  • Milestone changed from Future Release to 3.7

Seems like this probably goes hand-in-hand with #24633.

#24 @wedi
11 years ago

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

Duplicate of #24633.

#25 @SergeyBiryukov
11 years ago

  • Milestone 3.7 deleted
Note: See TracTickets for help on using tickets.