patreon-wordpress
patreon-wordpress copied to clipboard
Attempt user fetch only if patron access token is not null
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 ''.