From ee8b3f22c32178b29d67ba2c5836747c281064d4 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 19 Jan 2015 10:53:33 +0000 Subject: [PATCH] Return WP_USER from check_password_reset_key Closes #7134 --- includes/shortcodes/class-wc-shortcode-my-account.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/shortcodes/class-wc-shortcode-my-account.php b/includes/shortcodes/class-wc-shortcode-my-account.php index a64e0935035..f082682654f 100644 --- a/includes/shortcodes/class-wc-shortcode-my-account.php +++ b/includes/shortcodes/class-wc-shortcode-my-account.php @@ -297,10 +297,9 @@ class WC_Shortcode_My_Account { * * @uses $wpdb WordPress Database object * - * @access public * @param string $key Hash to validate sending user's password * @param string $login The user login - * @return object|bool User's database row on success, false for invalid keys + * @return WP_USER|bool User's database row on success, false for invalid keys */ public static function check_password_reset_key( $key, $login ) { global $wpdb, $wp_hasher; @@ -333,7 +332,7 @@ class WC_Shortcode_My_Account { return false; } - return $user; + return get_userdata( $user->ID ); } /**