wp_ajax_nopriv_generate_password() WordPress Function

The wp_ajax_nopriv_generate_password() function allows users to generate a random password for their WordPress account. This function can be used to create a new password for an existing account or to create a new account. To use this function, a user must first enter their WordPress username and email address. Once the username and email address have been entered, the user will be asked to enter a new password. After the new password has been entered, the user will be asked to confirm the new password. Once the new password has been confirmed, the user will be able to login to their WordPress account using their new password.

wp_ajax_nopriv_generate_password() #

Ajax handler for generating a password in the no-privilege context.


Source

File: wp-admin/includes/ajax-actions.php

function wp_ajax_nopriv_generate_password() {
	wp_send_json_success( wp_generate_password( 24 ) );
}


Top ↑

Changelog

Changelog
VersionDescription
5.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More