Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

In the dashboard there is a setting asking you what the default role of new accounts should be. Just select it from the drop down list. Problem is that both website and Unity signups will be assigned the same role. As I explained above about setting that usermeta entry,  find that same place in the function (basically, just before returning success) and instead of writing that entry to usermeta change the user's role instead. If you need help with the code, just send me an email and I'll send it to you. Should only be about 2 lines of code. 1 to add the new role and one to remove the previous role. 

Actually, I don't know how the heck this works but for some reason WordPress actually lets you have multiple roles... When you query the user's roles it gets returned as an array :O Weird... Anyway, yeah, sould only be 2 lines of code so let me know if you struggle with that and I'll help you out :)