Get User Group Data
User Group Index |
User Group Config |
Set User Group Data
Help with Function Parameters
Show / Hide Help
Name: The name of the function parameter (argument).
Data Type: The data type that is expected by the parameter.
- 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.
Required: Defines whether the parameter requires a value to be submitted.
Default: Defines the default parameter value that is used if no other value is submitted.
get_groups()
Gets a list of user groups filtered by a custom SQL WHERE statement.
Library and Requirements
Available via the standard library.
Function Parameters
get_groups(sql_select, sql_where)
Help
Name |
Data Type |
Required |
Default |
Description |
sql_select |
string | array |
No |
FALSE |
Define the database fields returned via an SQL SELECT statement.
Read the defining SQL documentation for further information.
|
sql_where |
string | array |
No |
FALSE |
Set the SQL WHERE statement used to filter the database records to return.
Read the defining SQL documentation for further information.
|
How it Works
The function uses the defined 'sql_where' argument to create an SQL WHERE statement to filter a list of user groups from the user group table.
The data returned by the query is defined via the 'sql_select' argument. If no columns are specified, all columns will be returned.
Notes
This function is compatible with flexi auths 'Query Builder' functions.
This function can be chained with CodeIgniters query functions 'result()', 'row()' etc.
Read the Query Result documentation for further information on all the combined flexi auth and CodeIgniter functions that are available.
Return Values
Failure:FALSE
Success:object
Examples
$sql_select = array(...);
$sql_where = array(...);
$this->flexi_auth->get_groups($sql_select, $sql_where)->result();
get_users_group()
Gets records from the user group table typically for a filtered set of users.
Library and Requirements
Available via the standard library.
Function Parameters
get_users_group(sql_select, sql_where)
Help
Name |
Data Type |
Required |
Default |
Description |
sql_select |
string | array |
No |
FALSE |
Define the database fields returned via an SQL SELECT statement.
Read the defining SQL documentation for further information.
|
sql_where |
string | array |
No |
FALSE |
Set the SQL WHERE statement used to filter the database records to return.
Read the defining SQL documentation for further information.
|
How it Works
By default the function is set to return all columns from the user group table for all filtered users.
However, by defining specific user table columns via the 'sql_select' argument, it is possible to return other user data.
Notes
This function is compatible with flexi auths 'Query Builder' functions.
This function can be chained with CodeIgniters query functions 'result()', 'row()' etc.
Read the Query Result documentation for further information on all the combined flexi auth and CodeIgniter functions that are available.
Return Values
Failure:FALSE
Success:object
Example
$sql_select = array(...);
$sql_where = array(...);
$this->flexi_auth->get_users_group($sql_select, $sql_where)->result();
get_user_group_id()
Get the users group id from the session.
Library and Requirements
Available via the lite and standard libraries.
How it Works
The function get the user group id value saved in the users browser session.
Return Values
Failure:FALSE
Success:int
Example
Note: The returned example values below are displaying live data from the current auth database and session data set via the demo set via the demo.
get_user_group_id()
What is the user group id of the current logged in user?
|
A PHP Error was encountered
Severity: Warning
Message: key() expects parameter 1 to be array, null given
Filename: libraries/Flexi_auth_lite.php
Line Number: 323
Backtrace:
File: /home/qeyafahc/public_html/application/libraries/Flexi_auth_lite.php
Line: 323
Function: key
File: /home/qeyafahc/public_html/application/views/user_guide/user_group/user_group_get_data_view.php
Line: 271
Function: get_user_group_id
File: /home/qeyafahc/public_html/application/controllers/User_guide.php
Line: 151
Function: view
File: /home/qeyafahc/public_html/index.php
Line: 315
Function: require_once
NULL
|
get_user_group()
Get the users user group name from the session.
Library and Requirements
Available via the lite and standard libraries.
How it Works
The function get the user group name saved in the users browser session.
Return Values
Failure:FALSE
Success:string
Example
Note: The returned example values below are displaying live data from the current auth database and session data set via the demo.
get_user_group()
What is the user group name of the current logged in user?
|
A PHP Error was encountered
Severity: Warning
Message: current() expects parameter 1 to be array, null given
Filename: libraries/Flexi_auth_lite.php
Line Number: 336
Backtrace:
File: /home/qeyafahc/public_html/application/libraries/Flexi_auth_lite.php
Line: 336
Function: current
File: /home/qeyafahc/public_html/application/views/user_guide/user_group/user_group_get_data_view.php
Line: 315
Function: get_user_group
File: /home/qeyafahc/public_html/application/controllers/User_guide.php
Line: 151
Function: view
File: /home/qeyafahc/public_html/index.php
Line: 315
Function: require_once
NULL
|