3

I'm setting up a membership site where registered members can access video pages.

The access to video pages needs to be done on a per member level. This will be done manually by the administrator.

For example certain members will have access to video page 1 and other members will have access to video page 2 etc.

What is the best way of setting this up?

Will I need to setup individual member groups?

3 Answers 3

2

There are a couple of different approaches that you can go about doing this. I am not a huge fan of the multiple member groups because it can be hard to maintain and it requires that you go to the Members admin area, select the members in question then change the member group as needed. If you have multiple videos and might need to have members able to see multiple videos it can easily become unmanageable. (5 videos would result in the need for 120 member groups for all video combinations, and 6 videos would result in 720 options)

The first option that I would recommend would be to take a look at something like Entry Access which will create a new tab on your publish page. You can configure presets for specific member groups or members if you want or by default it will grant access to everyone unless you have selected certain member/groups to have access.

The second option is fairly similar, there are a couple of Member fieldtypes (VMG Chosen Member or VZ Members). With these you would select the members then you would need to have some logic in your template that checked the logged_in_member_id vs the output of the field_name of the member fieldtype you created.

2

EE can control access based on member groups, most directly by setting permissions on specific templates. These are set in the control panel under Design / Template Manager and then the Access link per template.

So, you could have templates for video1, video2, etc., and then set the Access per template set to specific groups.

If you have members who need access to multiple pages--e.g., as if they were in multiple groups, this is not possible with EE member groups. A user can be assigned to only one EE member group.

In that case--or, if you have a large number of members such that you'd need too large a number of groups, then you'd maybe use groups simply to have a "Members" group to distinguish between the public/guests and members. All of your members would be in that Members group.

But then you'd need to write custom code on your video page(s) to restrict access based on some data in each member's profile. You'd essentially be writing a custom member access manager, albeit it could pretty simple depending on how many different groups you have and how people are assigned to them.

There are many ways to do this--and lots of people do do this. I think using add-ons like either Solspace User or Profile:Edit would be helpful. There are other add-ons like this, too.

(I'm doing something like this now on a site, using Profile:Edit, which gives each user a regular channel entry. I then assign categories to those user entries that are used to restrict what content they see. I've used Solspace User in the past for something similar.)

1
  • That's super helpful. Thanks for the info and advice. Nov 7, 2013 at 4:39
2

At the most basic level, yes, you will need to set up unique member groups in EE. Then in your template add some conditionals. Modify the group_id numbers as needed.

{if logged_in_group_id != "1" OR logged_in_group_id != "6" OR logged_out}
  {redirect="/"}
{/if}
{if logged_in_group_id == "1" OR logged_in_group_id == "6"}
  show this page
{/if}

I'd even suggest getting the IfElse add-on and do this:

{exp:ifelse parse="inward"}
  {if logged_in_group_id == "1" OR logged_in_group_id == "6"}
    {!-- page content --}
  {if:else}
    {redirect="/"} {!-- or whatever else you want to happen --}
  {/if}
{/exp:ifelse}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.