Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Ben Edmunds HOME CODE POSTS ABOUT
Author:Ben Author: Ben E
Documentation Ion Auth Auth › Documentation
Ion Auth Ion Auth is a simple and lightweight authentication library for f or the CodeIgniter framework Sign up to vote on this title
Useful
Not useful
Want to learn more? Or just support my work?
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Ion Auth is released under the Apache License v2.0. You can read the license he http://www.apache.org/licenses/LICENSE-2.0
Sheet Music
1. Download the latest version: http://github.com/benedmunds/CodeIgniterAuth/zipball/2
2. Copy the files from this package to the correspoding folder in your applica folder. For example, copy Ion_auth/config/ion_auth Ion_auth/config/ion_auth.php .php to system/application/config/ion_auth.php. 3. Run the appropriate appropriate SQL file from the /sql directory. The default login is: Email:
[email protected] Password: password
You load Ion Auth just link any other library: l ibrary:
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Ion Auth is released under the Apache License v2.0. You can read the license he http://www.apache.org/licenses/LICENSE-2.0
Sheet Music
1. Download the latest version: http://github.com/benedmunds/CodeIgniterAuth/zipball/2
2. Copy the files from this package to the correspoding folder in your applica folder. For example, copy Ion_auth/config/ion_auth Ion_auth/config/ion_auth.php .php to system/application/config/ion_auth.php. 3. Run the appropriate appropriate SQL file from the /sql directory. The default login is: Email:
[email protected] Password: password
You load Ion Auth just link any other library: l ibrary:
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
595 views
0
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
$config['tables']['users'] $config['tables']['users_groups'] $config['tables']['login_attempts'] $config['site_title'] $config['admin_email'] $config['default_group'] $config['admin_group'] $config['join']['users'] $config['join']['groups'] $config['identity'] $config['min_password_length'] $config['max_password_length'] $config['email_activation'] $config['remember_users'] $config['user_expire'] $config['user_extend_on_login'] $config['email_type'] $config['email_templates']
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Upload
Sign In
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
$config['message_start_delimiter'] $config['message_end_delimiter'] $config['error_start_delimiter'] $config['error_end_delimiter']
To change configuration options simply edit the config/ion_auth.php file.
Edit the ion_auth $config array as needed: 'tables['groups']' - The table name to use for the groups table. DEFAULT is 'groups'. You're Reading a Preview
'tables['users']' - The table name to use for the users table. DEFAULT is 'us Unlock full access with a free trial.
'tables['users_groups']' - The table name to use for the users groups table. DEFAULT is 'users_groups'.Download With Free Trial
'tables['login_attempts']' - The table name to use for the login attempts tabl DEFAULT is 'login_attempts'.
Sign up to vote on this title
Useful Not useful 'site_title' - The title of your site, used for email.
'admin_email' - Your administrator email address. DEFAULT is
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
595 views
0
Upload
Sign In
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
whatever you set this option to. DEFAULT is 'email'. 'min_password_length' - Minimum length of passwords. DEFAULT is '8'. 'max_password_length' - Maximum length of passwords. DEFAULT is '20'.
'email_activation' - TRUE or FALSE. Sets whether to require email activatio not. DEFAULT is 'false'.
'remember_users' - TRUE or FALSE. Sets whether to enable 'remember me functionality or not. DEFAULT is 'true'.
'user_expire' - Sets how long to remember the user for in seconds. Set to z no expiration. DEFAULT is '86500'.
'user_extend_on_login' - TRUE or FALSE. Extend the users session expirati login. DEFAULT is 'false'. 'email_type' - Email content type. DEFAULT us 'html'.
'email_templates' - Folder where the email view templates are stored. DEFA is 'auth/email/'.
You're Reading a Preview Unlock full access with a free trial.
'email_activate' - Filname of the email activation view template. DEFAULT 'activate.tpl.php'.
Download With Free Trial
'email_forgot_password' - Filname of the forgot password email view temp DEFAULT is 'forgot_password.tpl.php'. Sign up to vote on this title
'email_forgot_password_complete' - FilnameofUseful the forgot password comp useful Not email view template. DEFAULT is 'new_password.tpl.php'.
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
>is_max_login_attempts_exceeded(). The controller should check this func and act appropriately. If set to 0, there is no maximum. DEFAULT is 3.
Sheet Music
'message_start_delimiter' - Starting delimiter for messages. DEFAULT is '<
'message_end_delimiter' - Ending delimiter for messages. DEFAULT is ''. 'error_end_delimiter' - Ending delimiter for errors. DEFAULT is ''.
Class Function Reference NOTE: Methods available in the model are called through the controller using
PHP5 magic. You should never use ion_auth_model->method() in your applications. You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Logs the user into the system. Parameters
Sign up to vote on this title
Useful
Not useful
1. 'Username' - string REQUIRED. Usually username or email but depends on
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
$identity = '
[email protected]'; $password = '12345678';
Sheet Music
$remember = TRUE; // remember the user $this->ion_auth->login($identity, $password, $remember);
Logs the user out of the system. Usage
$this->ion_auth->logout();
You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Sign up to vote on this title
Register (create) a new user.
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Return
mixed. The ID of the user if the user was successfully created, FALSE if was not created. Usage
$username = 'benedmunds'; $password = '12345678'; $email = '
[email protected]'; $additional_data = array( 'first_name' 'last_name' ); $group = array('1'); // Sets user to admin. No need for arr
$this->ion_auth->register($username, $password, $email, $add
You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Sign up to vote on this title
Update a user.
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
$id = 12; $data = array(
Sheet Music
'first_name' => 'Ben', 'last_name' => 'Edmunds', 'password' => '123456789', ); $this->ion_auth->update($id, $data)
Delete a user. Parameters
1. 'Id' - integer REQUIRED.
You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Return
boolean. TRUE if the user was successfully deleted FALSE if the user was deleted. Usage
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Upload
Sign In
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Resets a users password by emailing the user a reset code. Parameters
1. 'Identity' - string REQUIRED. (as defined in config/ion_auth.php) Return
boolean. TRUE if the users password was successfully reset FALSE if the password was not reset. Usage
- this example assumes you have 'email' selected as the identity in config/ion_auth.php
//Working code for this example is in the example Auth contro function forgot_password() {
You're Reading a Preview
$this->form_validation->set_rules('email', 'Email Add Unlock full access with a free trial.
if ($this->form_validation->run() == false) {
Download Trial //setup With the Free input $this->data['email'] = array('name'
Sign up to vote on this title
=> 'em
Useful Not useful //set any errorsand display the form
$this->data['message'] = (validation_errors())
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
else { $this->session->set_flashdata('mess
Sheet Music
redirect("auth/forgot_password", 'ref } } }
Final step of resetting a users password. The user comes to this page from thei email. Parameters
1. 'Code' - string REQUIRED.
You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Return
string. The users new password. Sign up to vote on this title
Usage
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
redirect("auth/forgot_password", 'refresh'); }
Sheet Music
}
Check to see if a user is logged in. Return
boolean. TRUE if the user is logged in FALSE if the user is not logged in. Usage You're Reading a Preview if (!$this->ion_auth->logged_in()) Unlock full access with a free trial. {
Download With Free Trial
redirect('auth/login'); }
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
boolean. TRUE if the user is an admin FALSE if the user is not an admin. Usage
if (!$this->ion_auth->is_admin()) { $this->session->set_flashdata('message', 'You must redirect('welcome/index'); }
You're Check to see if the currently logged in Reading user is ainPreview the passed in group.
Parameters
Unlock full access with a free trial.
Download With Free Trial
1. 'Group ID or Name' - string, integer or array of strings and integers REQUIR
2. 'User ID' - integer OPTIONAL. If a user id is not passed the id of the current logged in user will be used.
Sign up to vote on this title
Return
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
595 views
0
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
# single group (by id)
Sheet Music
$group = 1; if (!$this->ion_auth->in_group($group)) { $this->session->set_flashdata('message', 'You must redirect('welcome/index'); }
# multiple groups (by name) $group = array('gangstas', 'hoodrats'); if (!$this->ion_auth->in_group($group)) $this->session->set_flashdata('message', 'You must redirect('welcome/index'); }
You're Reading a Preview
# multiple groups (by id)
Unlock2); full access with a free trial. $group = array(1,
if (!$this->ion_auth->in_group($group))
Download With Free Trial
$this->session->set_flashdata('message', 'You must redirect('welcome/index'); }
Sign up to vote on this title
# multiple groups (by id and name)
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Check to see if the username is already registered. Parameters
1. 'Username' - string REQUIRED. Return
boolean. TRUE if the user is registered FALSE if the user is not registered. Usage
//This is a lame example but it works.
Usually you would use
$username = $this->input->post('username'); $password = $this->input->post('password');
You're Reading a Preview $email = $this->input->post('email'); Unlock access with a free trial. $additional_data = full array(
Download With Free Trial
'first_name' 'last_name' );
if (!$this->ion_auth->username_check($username)) Sign up to vote on this title { Useful Not useful $group_name = 'users';
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Parameters
1. 'Email' - string REQUIRED. Return
boolean. TRUE if the user is registered FALSE if the user is not registered. Usage
//This is a lame example but it works.
Usually you would use
$username = $this->input->post('username'); $password = $this->input->post('password'); $email = $this->input->post('email'); $additional_data = array( 'first_name' 'last_name' );
You're Reading a Preview if (!$this->ion_auth->email_check($email)) Unlock full access with a free trial.
{
Download With Free Trial $group_name = 'users';
$this->ion_auth->register($username, $password, $emai }
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
boolean. TRUE if the user is registered FALSE if the user is not registered. Usage
//This is a lame example but it works. $user = $this->ion_auth->user(); $data = array(
'identity' => $this->input->post('ide
'first_name' => $this->input->post('f
'last_name' => $this->input->post('la );
if ($data['identity'] === $user->username || $data['identity' { $this->ion_auth->update_user($user->id, $data) }
You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Sign up to vote on this title
If login attempt tracking is enabled, checks to see if the number of failed login Useful Not useful
attempts for this identity or ip address has been exceeded. The controller must
this method and take any necessary actions. Login attempt limits are not enforc
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
$identity = '
[email protected]';
if ($this->ion_auth->is_max_login_attempts_exceeded($identity) Sheet Music
{ $this->session->set_flashdata('message', 'You have redirect('welcome/index'); }
Returns the number of failed login attempts for this identity or ip address. Parameters You're Reading a Preview
1. 'Identity' - string REQUIRED. Unlock full access with a free trial. Return
Download With Free Trial
int. The number of failed login attempts for this identity or ip address. Usage
Sign up to vote on this title
Useful
$identity = '
[email protected]';
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
method if the login failed. Parameters
1. 'Identity' - string REQUIRED. Usage
$identity = '
[email protected]'; $password = '12345678'; if ($this->ion_auth->login($identity, $password) == FALSE)
$this->ion_auth->increase_login_attempts($identity) }
You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Clears all failed login attempt records for this identity or this ip address. This method is automatically called during the login() method if the login succeded. Parameters
1. 'Identity' - string REQUIRED.
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Upload
Sign In
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
Download
1
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Get a user. Parameters
1. 'Id' - integer OPTIONAL. If a user id is not passed the id of the currently log user will be used. Return
stdClass Object ( [id] => 1 [ip_address] => 127.0.0.1 [username] => administrator [password] => 59beecdf7fc966e2f17fd8f6
You're Reading a Preview
[salt] => 9462e8eee0
Unlock full access with a free trial.
[email] =>
[email protected]
[activation_code] => 19e181f2ccc2a7ea58a Download With Free Trial
[forgotten_password_code] => 81dce1d0bc2
[remember_code] => 9d029802e28cd9c768e8e [created_on] => 1268889823 Sign up to vote on this title [last_login] => 1279464628 Useful Not useful [active] => 0
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Get the users. Parameters
1. 'Group IDs' - array OPTIONAL. If an array of group ids are passed (or a sing group id) this will return the users in those groups. Return
array of objects Usage
You're Reading a Preview Unlock full access with a free trial.
$users = $this->ion_auth->users()->result(); Download With Free Trial
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
$group_id = 2; $group = $this->ion_auth->group($group_id);
Get the groups. Return
array of objects Usage You're Reading a Preview
$groups = $this->ion_auth->groups()->result(); Unlock full access with a free trial.
Download With Free Trial
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
); if ($this->ion_auth->update_user($id, $data))
Sheet Music
{ $messages = $this->ion_auth->messages(); echo $messages; }
else { $errors = $this->ion_auth->errors(); echo $errors; }
You're Reading a Preview Unlock full access with a free trial.
Get messages as an array.
Download With Free Trial
Return
array
Sign up to vote on this title
Parameters
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
$messages = $this->ion_auth->messages_array(); foreach ($messages as $message)
Sheet Music
{ echo $message; } }
else { $errors = $this->ion_auth->errors_array(); foreach ($errors as $error) { echo $error; } }
You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Get all groups a user is part of.
Sign up to vote on this title
Parameters
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Usage
Sheet Music
$user_groups = $this->ion_auth->get_users_groups($user->id)->r
Remove user from group(s) Parameters
1. 'User_id' - integer REQUIRED. You're Reading a Preview
Return
Unlock full access with a free trial.
boolean. TRUE if the user was removed from group(s) FALSE if the user is removed from group(s).
Download With Free Trial
Usage Sign up to vote on this title // pass an array of group ID's and user ID Useful
Not useful
$this->ion_auth->remove_from_group(array('1', '3', '6'), $user_id);
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Create a group Parameters
1. 'group_name' - string REQUIRED. 2. 'group_description' - string. Return
brand new group_id if the group was created, FALSE if the group creation f Usage
// pass the right arguments and it's done $group = $this->ion_auth->create_group('new_test_group', 'This is a
You're Reading a Preview
Unlock full access with a free trial.
if(!$group) {
Download With Free Trial $view_errors = $this->ion_auth->messages();
}
Sign up to vote on this title
else
{ $new_group_id = $group;
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Parameters
1. 'group_id' - int REQUIRED. 2. 'group_name' - string REQUIRED. 3. 'group_description' - string. Return
boolean. TRUE if the group was updated, FALSE if the update failed. Usage
// source these things from anywhere you like $group_id = 2; $group_name = 'test_group_changed_name';
$group_description = 'I changed the name yay'
You're Reading a Preview
// pass the right arguments and it's done
Unlock full access with a free trial.
$group_update = $this->ion_auth->update_group($group_id, $group_name
Download With Free Trial
if(!$group_update) { $view_errors = $this->ion_auth->messages(); Sign up to vote on this title }
else
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Remove a group. Removes the group details from the configured 'groups' table.
Users belonging to the group are stripped of this status (references to this group
Sheet Music
are removed from users_groups), but user data itself remains untouched. Parameters
1. 'group_id' - int REQUIRED. Return
boolean. TRUE if the group was deleted, FALSE if the delete failed. Usage
// source this from anywhere you like (eg., $group_id = 2;
// pass the right arguments and it's done
You're Reading a Preview $group_delete = $this->ion_auth->delete_group($group_id); Unlock full access with a free trial.
if(!$group_delete)
Download With Free Trial
{ $view_errors = $this->ion_auth->messages(); }
else {
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Parameters
1. 'Start Delimiter' - string REQUIRED. 2. 'End Delimiter' - string REQUIRED. Usage
$id = 12; $data = array( 'first_name' => 'Ben', 'last_name' => 'Edmunds', ); if ($this->ion_auth->update_user($id, $data)) {
$this->ion_auth->set_message_delimiters('
', $messages = $this->ion_auth->messages();
You're Reading a Preview echo $messages; }
else
Unlock full access with a free trial.
Download With Free Trial
{
$this->ion_auth->set_error_delimiters('','< $errors = $this->ion_auth->errors(); Sign up to vote on this title echo $errors; Useful Not useful
}
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Usage
$id = 12; $data = array( 'first_name' => 'Ben', 'last_name' => 'Edmunds', ); if ($this->ion_auth->update_user($id, $data)) { $messages = $this->ion_auth->messages(); echo $messages; }
else { $errors = $this->ion_auth->errors(); echo $errors; }
You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
$id = 12; $data = array( 'first_name' => 'Ben', 'last_name' => 'Edmunds', ); if ($this->ion_auth->update_user($id, $data)) { $messages = $this->ion_auth->messages_array(); foreach ($messages as $message) { echo $message; } }
else { $errorsYou're = $this->ion_auth->errors_array(); Reading a Preview foreach ($errors as $error)
Unlock full access with a free trial.
{
Download With Free Trial echo $error; } }
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Usage
$id = 12; $data = array( 'first_name' => 'Ben', 'last_name' => 'Edmunds', ); if ($this->ion_auth->update_user($id, $data)) {
$this->ion_auth->set_message_delimiters('', $messages = $this->ion_auth->messages(); echo $messages; }
else {
$this->ion_auth->set_error_delimiters('','<
You're Reading a Preview
$errors = $this->ion_auth->errors(); Unlock full access with a free trial.
echo $errors; }
Download With Free Trial
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
5. 'Arguments' - Array OPTIONAL. Usage
class Accounts extends CI_Controller {
public function __construct() {
parent::__construct();
/* make sure we loaded ion_auth2 The following does not need to go in __construct() it just needs to you trigger_events(). */ $event = 'socialpush'; $class = 'Accounts';
You're Reading a Preview Unlock full access with a free trial.
$args = array('this is the content of the message', 'billy');
Download With Free Trial $name = 'activate_sendmail'; $method = 'email';
$this->ion_auth->set_hook($event, $name, $class, $method, $args); Sign up to vote on this title $name = 'call_Twitter'; $method = 'twitter';
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
public function Post_Message($one)
Sheet Music
{
$this->ion_auth->trigger_events('socialpush'); } public function email($content, $who) { return true; } public function twitter($content, $who) { return true; } public function mailchimp($content, $who) { return true;
You're Reading a Preview
}
Unlock full access with a free trial. public function facebook($content, $who)
{
Download With Free Trial return true;
} public function gplus($content, $who)
Sign up to vote on this title
{ return true;
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join
Search
Home
Saved
0
595 views
Sign In
Upload
Join
RELATED TITLES
0
Ion Auth Docs.pdf Uploaded by Dianne Karen Consolacion
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Contains examples on how to use basic functions of Ion Auth library for CodeIgniter Ch12 OS Security
Save
Embed
Share
Print
1
Download
of 36
Host PArasite Model I-15
Pointers Parameters
Search document
Parameters
1. 'Name' - String or Array REQUIRED. Usage
$this->ion_auth->trigger_events('socialpush');
Top of Page
CodeIgniter · Copyright © 2010 Ben Edmunds · Ellislab, Inc.
You're Reading a Preview Unlock full access with a free trial.
Download With Free Trial
Sign up to vote on this title
Useful
Not useful
Home
Saved
Bestsellers
Books
Audiobooks
Magazines
News
Documents
Sheet Music
Upload
Sign In
Join