Using User roles instead on logged in

hey guyz, i followed queen code video “2017 Create Member Profile Log In Page - Custom Private Client Member Dashboard - Wix Code - YouTube” regarding the custom profile page for members and it is working perfectly.
Now im trying to change a small part in the code where the member is verified by the role using the getrole() function not by the “logged in”.
Here i started getting error regarding promise which make it really complicated for me i would appreciate a little help in here as im stuck in this issue…thank you

Hello.

If you head over to the user.getRoles() api documentation here , you will see that this function returns one of the roles that you have set up. If you have not set up roles on your site here is how. The .getRoles() function will return one of the roles you have created, so all that is left to do after that would be to change:

if(roleName === "member") 

to

if(roleName === "roleThatYouCreatedName")

Let me know if this helps,
Majd

Hi majd, thank you problem solved now