App Passwords: Return true when rate limiting a password's last used time.

Previously we returned a `WP_Error` instance saying that the password was not found which is inaccurate.

Props dlh.
Fixes #51922.


git-svn-id: https://develop.svn.wordpress.org/trunk@49739 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Timothy Jacobs 2020-12-03 16:28:08 +00:00
parent a9064e9d19
commit 59b018ff86

View File

@ -203,7 +203,7 @@ class WP_Application_Passwords {
// Only record activity once a day.
if ( $password['last_used'] + DAY_IN_SECONDS > time() ) {
continue;
return true;
}
$password['last_used'] = time();