Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#33450 closed enhancement (fixed)

Clicking `Generate Password` after `Cancel` should generate a new password

Reported by: adamsilverstein's profile adamsilverstein Owned by: adamsilverstein's profile adamsilverstein
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.3
Component: Users Keywords: has-patch
Focuses: ui, administration Cc:

Description

This issue was brought to my attention by @TheLastCicada.

On screens with the new password generation feature, we offer users a button to Cancel the generate password action (see #33079). If the user clicks Cancel (say for example they don't like the generated password), then decides the click Generate Password again, the field shows the same password as before.

A nice enhancement here would be to regenerate the password each time the user clicked Cancel and then clicked Generate Password again.

Screencast of issue: http://cl.ly/image/39050z0S1c1u

Attachments (2)

33450.diff (1.8 KB) - added by adamsilverstein 9 years ago.
33450.2.diff (1.8 KB) - added by adamsilverstein 9 years ago.

Download all attachments as: .zip

Change History (15)

#1 @adamsilverstein
9 years ago

  • Keywords has-patch dev-feedback added

33450.diff:

Proposed fix, adds ajax callback to regenerate password, fires when user clicks Cancel, in preparation for next 'Generate Password

Screencast after patch: http://cl.ly/image/45253H0W0Y2H

#2 @adamsilverstein
9 years ago

  • Owner set to adamsilverstein
  • Status changed from new to assigned

#3 @adamsilverstein
9 years ago

  • Type changed from defect (bug) to enhancement

#4 @adamsilverstein
9 years ago

  • Milestone changed from Awaiting Review to 4.3.1

This ticket was mentioned in Slack in #core-passwords by sam. View the logs.


9 years ago

#6 @adamsilverstein
9 years ago

  • Keywords commit added; dev-feedback removed

33450.2.diff:

  • Refresh against trunk.

I verified that the ajax callback is only available to logged in users - hitting the endpoint after logout in a different tab gave me a '0' result. This makes sense because the callback action is added to $core_actions_post which results in ajax endpoints without the nopriv_ variation required for privileged users to access.

This ticket was mentioned in Slack in #core-passwords by adamsilverstein. View the logs.


9 years ago

This ticket was mentioned in Slack in #core-passwords by ocean90. View the logs.


9 years ago

#9 follow-up: @ocean90
9 years ago

  • Keywords commit removed
  • Milestone changed from 4.3.1 to 4.4

33450.2.diff

  • The summary for wp_ajax_generate_password() should be something like "AJAX handler for generating a password"
  • Since wp-utils is already a dependency of user-profile we can use wp.ajax() here.

Changing milestone because this is an enhancement.

#10 in reply to: ↑ 9 @adamsilverstein
9 years ago

Thanks for the feedback, I will refresh the patch.

Replying to ocean90:

33450.2.diff

  • The summary for wp_ajax_generate_password() should be something like "AJAX handler for generating a password"
  • Since wp-utils is already a dependency of user-profile we can use wp.ajax() here.

Changing milestone because this is an enhancement.

#11 @wonderboymusic
9 years ago

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

In 34312:

Profile: when clicking "Cancel" after clicking "Generate Password", request and generate a new password to present to the user.

Props adamsilverstein, wonderboymusic.
Fixes #33450.

#12 @ocean90
9 years ago

In 34313:

Use correct @since tag for wp_ajax_generate_password().

See #33450.

#13 @wonderboymusic
9 years ago

#33890 was marked as a duplicate.

Note: See TracTickets for help on using tickets.