Change WordPress user roles and capabilities Forums Bug Reports “no role for this site” & [user_role_editor roles=”none”] Reply To: “no role for this site” & [user_role_editor roles=”none”]

#7749
TWarrior
Participant

thank you very much for your kind and quick response. It is a pleasure to be attended by the responsible of this great plugin.

Forgive me, but I don’t quite understand your answer.

I take this opportunity to explain my need (and I suppose that of many others who use “no role for this site”).

Traditionally, we used to show content only for active members (with any role such as administrator, editor, subscriber…) of the NGO with this code:

[user_role_editor roles=”none”]Please join our NGO, or loggin (text for non logged-in or not members yet)[/user_role_editor]
[user_role_editor except_roles=”none”]Some text only for NGO active members with any rol[/user_role_editor]

But now we have members who have temporarily unsubscribed. We don’t want to delete their user accounts, so we thought that assigning them to “No role for this site” might be a solution.

So we would like these people without a role, even if they are logged in, not to be able to see content that is only for members with a role.

I understand the importance of backwards compatibility, but it is very strange that “role=none” actually means “role=logged_out”, and also there is no “role=no_role” to handle non-role users…

Let me humbly make you a proposal:
Add the value “role=no_role” to handle users with “no role on this site”.

I think this way we could use the following code to display restricted content only for members with an assigned role:

[user_role_editor roles=”none,no_role”]Please join our NGO, or loggin (text for non logged-in or logged with “no role for this site”).[/user_role_editor]
[user_role_editor except_roles=”none,no_role”]Some text only for NGO active members with any rol[/user_role_editor]

What is your opinion? Could it work?