refresh.User
account and subscription helpers for the logged in user.
refresh.User.GetName()
stringdisplay name of the logged in account. returns empty text when logged out.
local name = refresh.User.GetName()refresh.User.GetSubscription()
stringactive subscription label. returns empty text when logged out or when none is active.
local sub = refresh.User.GetSubscription()refresh.User.GetEmail()
stringaccount email address. returns empty text when logged out.
local email = refresh.User.GetEmail()refresh.User.GetExpiry()
numbersubscription expiry time as unix timestamp. returns 0 when logged out.
if refresh.User.GetExpiry() < os.time() then print("expired") endrefresh.User.IsLoggedIn()
booleanchecks if an auth session is currently active.
if not refresh.User.IsLoggedIn() then return endrefresh.User.Auth()
table | falsecurrent 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) endrefresh.User.HasLicense(product)
booleanchecks if the subscription label contains the given text. matching ignores case.
if not refresh.User.HasLicense("executor") then return end