# \[SOLVED\] I'm the owner/admin of the website but why is my role member?

**URL:** <https://forum.wixstudio.com/t/solved-im-the-owner-admin-of-the-website-but-why-is-my-role-member/6381>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [October 13, 2021, 8:17am UTC](https://forum.wixstudio.com/t/solved-im-the-owner-admin-of-the-website-but-why-is-my-role-member/6381 "2021-10-13T08:17:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chocookie22](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/chocookie22/32/8508_2.png) [@chocookie22](https://forum.wixstudio.com/u/chocookie22)\
**Post date:** [October 13, 2021, 8:17am UTC](https://forum.wixstudio.com/t/solved-im-the-owner-admin-of-the-website-but-why-is-my-role-member/6381/1 "2021-10-13T08:17:22Z")

</div>

I want to show/hide a custom menu based on different roles but my admin account is identified as a member. Here’s how I checked the role via code:

```javascript
let userRole = wixUsers.currentUser.role
console.log(userRole)

```

In the console logs it shows up as Member. I made sure that I logged in my Owner/Admin account.

 ![](https://us1.discourse-cdn.com/wix/original/3X/e/a/ea436dffe5b53df032ed514935b7625bcbb9f491.png)

Am I missing something? I spent the entire day figuring this out, I’ve read other threads as well. I’m stumped and I’m really desperate.

---

<div class="post-metadata">

**Author:** ![chocookie22](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/chocookie22/32/8508_2.png) [@chocookie22](https://forum.wixstudio.com/u/chocookie22)\
**Post date:** [October 13, 2021, 12:07pm UTC](https://forum.wixstudio.com/t/solved-im-the-owner-admin-of-the-website-but-why-is-my-role-member/6381/2 "2021-10-13T12:07:53Z")

</div>

Anyone?

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [October 13, 2021, 12:46pm UTC](https://forum.wixstudio.com/t/solved-im-the-owner-admin-of-the-website-but-why-is-my-role-member/6381/3 "2021-10-13T12:46:35Z")

</div>

@chocookie22  
Can you console-log it for me and show the console-log (using google-chrome)? I do not have the possibility right now to do it myself.  
console . log ( userRole )  
Waiting for Screenshot.  
Also open all given 3-dots(objects) inside the log.

As i can remember the role includes an array with 2 different roles–\> [0],[1]

---

<div class="post-metadata">

**Author:** ![chocookie22](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/chocookie22/32/8508_2.png) [@chocookie22](https://forum.wixstudio.com/u/chocookie22)\
**Post date:** [October 13, 2021, 9:01pm UTC](https://forum.wixstudio.com/t/solved-im-the-owner-admin-of-the-website-but-why-is-my-role-member/6381/4 "2021-10-13T21:01:02Z")

</div>

@russian-dima Thank you so much for responding, here’s the screenshot.

 ![](https://us1.discourse-cdn.com/wix/original/3X/1/9/19f3f0fed16cea5b6c1bfcd72880c1b4eeb92343.png)

Just to clarify, I assign the roles via Dashboard\>CRM Tools\>Site Members right?

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [October 14, 2021, 1:44am UTC](https://forum.wixstudio.com/t/solved-im-the-owner-admin-of-the-website-but-why-is-my-role-member/6381/5 "2021-10-14T01:44:24Z")

</div>

@chocookie22  
Ok, i checked the problem for you and i could figure out that everything works like it should.

After login as ADMIN, i get this console-log in my Browser…

![](https://us1.discourse-cdn.com/wix/original/3X/0/2/023257e2fc547c5d37af921b1cadbecee7944000.png)  
Here the code for you to do the same…

```javascript
import wixUsers from 'wix-users';

$w.onReady(function() {
  let currentUser = wixUsers.currentUser; console.log("Current-User: ", currentUser);
  let userRole = wixUsers.currentUser.role; console.log("User-Role: ", userRole);
});

```

Please next time try to do exactly what is asked from you → using the console.log of your browser instead of the integrated one, provided by the wix-editor.😉  
When i do a LOG-OUT, the result will be the following…

![](https://us1.discourse-cdn.com/wix/original/3X/f/f/ffef40e553acb377a8d196a55f925357959078da.png)  
So you must do something wrong. I think the user you are logging-in is not an ADMIN.

---

<div class="post-metadata">

**Author:** ![chocookie22](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/chocookie22/32/8508_2.png) [@chocookie22](https://forum.wixstudio.com/u/chocookie22)\
**Post date:** [October 14, 2021, 5:24am UTC](https://forum.wixstudio.com/t/solved-im-the-owner-admin-of-the-website-but-why-is-my-role-member/6381/6 "2021-10-14T05:24:15Z")

</div>

@russian-dima I just tried out your code and it works! Thank you so much! Terribly sorry for sending you the integrated console.log results. I’ll definitely keep that in mind. Thanks again!

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [October 14, 2021, 5:34am UTC](https://forum.wixstudio.com/t/solved-im-the-owner-admin-of-the-website-but-why-is-my-role-member/6381/7 "2021-10-14T05:34:51Z")

</div>

@chocookie22  
And to reply your question, which i did not see first time…

> Just to clarify, I assign the roles via Dashboard\>CRM Tools\>Site Members right?

Yes, thats right! Or you generate your own Role&Badge Management-System, like shown in this Login-System-Example…

[https://russian-dima.wixsite.com/login-system/vnbadgemgm](https://russian-dima.wixsite.com/login-system/vnbadgemgm)

More informations about, you will find inside the Login-System itself by visiting the given example pages and setups.

[https://russian-dima.wixsite.com/login-system/info](https://russian-dima.wixsite.com/login-system/info)

---

<div class="post-metadata">

**Author:** ![chocookie22](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/chocookie22/32/8508_2.png) [@chocookie22](https://forum.wixstudio.com/u/chocookie22)\
**Post date:** [October 14, 2021, 7:34am UTC](https://forum.wixstudio.com/t/solved-im-the-owner-admin-of-the-website-but-why-is-my-role-member/6381/8 "2021-10-14T07:34:45Z")

</div>

@russian-dima This is amazing! Consider this bookmarked for future references.
