lua docs.

simple reference for every namespace.

refresh.User

account and subscription helpers for the logged in user.

refresh.User.GetName()

string

display name of the logged in account. returns empty text when logged out.

local name = refresh.User.GetName()

refresh.User.GetSubscription()

string

active subscription label. returns empty text when logged out or when none is active.

local sub = refresh.User.GetSubscription()

refresh.User.GetEmail()

string

account email address. returns empty text when logged out.

local email = refresh.User.GetEmail()

refresh.User.GetExpiry()

number

subscription expiry time as unix timestamp. returns 0 when logged out.

if refresh.User.GetExpiry() < os.time() then print("expired") end

refresh.User.IsLoggedIn()

boolean

checks if an auth session is currently active.

if not refresh.User.IsLoggedIn() then return end

refresh.User.Auth()

table | false

current session details with username, email, subscription, session id and expiry. returns false when logged out.

local me = refresh.User.Auth()
if me then print(me.username, me.subscription) end

refresh.User.HasLicense(product)

boolean

checks if the subscription label contains the given text. matching ignores case.

if not refresh.User.HasLicense("executor") then return end