Due to the introduction of Community names there has been what I consider 4 different account types.
- Gold
- Classic
- Community (People with an actual community name not Graal######)
- Trial
This snippet will let you identify them accordingly, and provide a proper string for use in profiles.
PHP Code:
function getUpgradeStatus(pl) {
temp.status = pl.upgradestatus;
switch (pl.upgradestatus) {
case "gold":
temp.status = "Gold";
break;
case "classic":
temp.status = "Classic";
break;
case "trial":
if (pl.communityname && !pl.communityname.starts("Graal")) {
temp.status = "Community";
} else {
temp.status = "Trial";
}
break;
}
return temp.status;
}