patreon-wordpress icon indicating copy to clipboard operation
patreon-wordpress copied to clipboard

Attempt user fetch only if patron access token is not null

Open beberry opened this issue 6 months ago • 0 comments

Problem

The getPatreonUser function attempts to fetch user data as long as access_token != ''. This check does not account for the access token being null. Access token data can be set to null if a token refresh failed. Because of this, the app might be attempting to refresh user tokens even of no token is available.

Solution

Use empty which checks for both - null and ''.

beberry avatar Jul 15 '25 00:07 beberry