User Guide | User Group Configuration

The key concept of the flexi auth library is to give the developer a toolbox of functions that they can use to build a user authentication system matching the custom specifications required by their site.

One of the ways that the library enhances the customisation of the authentication system is by allowing many of the internal library settings to be defined by the developer via the libraries config file.

User Group Configuration

User Group Index | Get User Group Data | Set User Group Data
Config Setup Information

Table Schema Diagram

Table and Config File Settings

User Group Table | User Group Config Settings

Help with the Table Configuration

Show / Hide Help

Config Name: The name that flexi auth internally references the config setting by.

Default: The default value set within the config file.

Data Type: The data type that is expected by the config setting.

  • bool : Requires a boolean value of 'TRUE' or 'FALSE'.
  • string : Requires a textual value.
  • int : Requires a numeric value. It does not matter whether the value is an integer, float, decimal etc.
  • array : Requires an array.
  • datetime : Requires a datetime value. Typically either a MySQL DATETIME (2000-12-31 12:00:00) or UNIX timestamp (1234567890)


Config File Location

The config file is located in CodeIgniters 'config' folder and is named 'flexi_auth.php'.

Schema Diagram : User Group Table

A database table schema diagram, showing how the user group table is related to the primary user account table.

Note: Table and columns names are defined using their config names referenced within the config file. The names within brackets are the default demo names.

User Group Table

The user group table is used to allocate a group classification to users, typically this is used to group users as either admins or public users.
The grouped users can then be delivered content specific to their group, or be restricted access to specific areas - i.e. an admin only area.


Table and Column Setup
Help
Config Name Default Data Type Description
table user_groups - The tables name.
join user_groups.ugrp_id - The tables foreign key used to join with foreign keys of other tables.
id ugrp_id int The tables primary key.
name ugrp_name string The name of the user group.
description ugrp_desc string A brief description of the user group.
admin ugrp_admin int Defined whether the user group is an 'admin' user group.
Example
// Defining the table, join and column names.
$config['database']['user_group']['table'] = 'user_groups';
$config['database']['user_group']['join'] = 'user_groups.ugrp_id';
$config['database']['user_group']['columns']['id'] = 'ugrp_id';

User Group Config Settings

User group configuration settings used when handling data related to the user group table.


Table and Column Setup
Help
Config Name Data Type Default Description
default_group_id int 1 Set the id of the default group that new users will be added to unless otherwise specified.
Example
// Defining the default group id that is assigned to new registered users if not defined directly via
// a function.
$config['settings']['default_group_id']	= 1;