Avatar of Leevi Graham

LG Access (Restrict To) Authorise specific members or groups to view ExpressionEngine templates

Download LG Access (Restrict To) v1.0.0 Table of contents

Features

LG Access (Restrict To) restricts access to ExpressionEngine templates based on specific member groups or ids. If a user is restricted they will be redirected to another url.

Requirements

LG Latest EE is an ExpressionEngine plugin tested ExpressionEngine 1.6.0 or greater.

Installation

LG Latest EE addon contains a single plugin file. To install the plugin follow the simple instructions below:

  1. Download the latest version of the plugin
  2. Extract the .zip file to your desktop
  3. Copy the plugins/pi.lg_restrict.php file to your /system/plugins directory

Activation

There are no activation requirements. Plugins are automatically available after install.

Usage

Place the {exp:lg_access:restrict_to} tag at the top of any page you wish to restrict access to. Authorised members can be determined by member group or id.

Tag Reference

LG Access

{exp:lg_access} has the following methods and parameters:

  1. Methods
  2. Parameters

Methods

  1. restrict_to
{exp:lg_access:restrict_to}
{exp:lg_access:restrict_to}

By default this tag allows only members to view the template. Blacklisted and banned members are the only exceptions and will never be allowed to view the content. Specific members and groups can be authorised using the following parameters:

Parameters

  1. member_id=
  2. group_id=
  3. redirect_to=
member_id= [required in {exp:lg_access:respond_to}]
member_id="1|40"

A single member id or a pipe delimited list of member ids

group_id= [required in {exp:lg_access:respond_to}]
group_id="1|2"

A single member group id or a pipe delimited list of member group ids

redirect_to= [required in {exp:lg_access:respond_to}]
redirect_to="members/login"

The template group / template unauthorised users are redirected to.

Change Log

1.0.0

  • Initial Release

License

Creative Commons License LG Restrict (Access To) is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.