WP_Recovery_Mode_Link_Service::generate_url() WordPress Method

The WP_Recovery_Mode_Link_Service::generate_url() method is used to generate a URL for a user to request a password reset. This is useful if a user has forgotten their password and needs to reset it. The method takes a user ID as its only parameter.

WP_Recovery_Mode_Link_Service::generate_url() #

Generates a URL to begin recovery mode.


Description

Only one recovery mode URL can may be valid at the same time.


Top ↑

Return

(string) Generated URL.


Top ↑

Source

File: wp-includes/class-wp-recovery-mode-link-service.php

	public function generate_url() {
		$token = $this->key_service->generate_recovery_mode_token();
		$key   = $this->key_service->generate_and_store_recovery_mode_key( $token );

		return $this->get_recovery_mode_begin_url( $token, $key );
	}


Top ↑

Changelog

Changelog
VersionDescription
5.2.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.