public static function findByPasswordResetToken($id, $code)
	{
		if (!static::isPasswordResetTokenValid($code)) {
			return NULL;
		}

		return static::findOne([
			'id'                   => $id,
			'password_reset_token' => $code,
			'status'               => self::STATUS_ACTIVE,
		]);
	}
public static function findByPasswordResetToken($id, $code)
	{
		if (!static::isPasswordResetTokenValid($code)) {
			return NULL;
		}

		return static::findOne([
			'id'                   => $id,
			'password_reset_token' => $code,
			'status'               => self::STATUS_ACTIVE,
		]);
	}
public static function findByPasswordResetToken ( $ id , $ code ) { if ( ! static :: isPasswordResetTokenValid ( $ code ) ) { return NULL ; } return static :: findOne ( [ 'id' => $ id , 'password_reset_token' => $ code , 'status' => self :: STATUS_ACTIVE , ] ) ; }
Finds user by password reset token

@param integer $id   user id
@param string  $code password reset token

@return null|static
Finds user by password reset token