CAFPE Docs
  • Class

Classes

  • Article_model
  • Articles
  • Auth
  • Auth_controller
  • Bcrypt
  • Hierarchical_controllers
  • Ion_auth
  • Ion_auth_model
  • MY_Controller
  • MY_Lang
  • MY_Model
  • Pages
  • Private_pages
  • Public_controller
  • Seeder
  • Slug
  • User_sessions
  • Users

Functions

  • action_result
  • actions_widget
  • admin_area_buttons
  • base64_current_url_encode
  • base64_url_decode
  • base64_url_encode
  • current_lang
  • jscript_tag
  • lang_switcher
  • logged_in
  • redirect_lang
  • site_url_lang
  • style_tag

Class Ion_auth_model

Name: Ion Auth Model

Author: Ben Edmunds ben.edmunds@gmail.com

CI_Model
Extended by Ion_auth_model
Benedmunds:

Added Awesomeness: Phil Sturgeon

Location: http://github.com/benedmunds/CodeIgniter-Ion-Auth

Created: 10.01.2009

Description: Modified auth system based on redux_auth with extensive customization. This is basically what Redux Auth 2 should be. Original Author name has been kept but that does not mean that the method has not been modified.

Requirements: PHP5 or above


Located at ionauth/models/Ion_auth_model.php

Methods summary

public
# __construct( )
public
# hash_password( $password, $salt = false, $use_sha1_override = FALSE )

Hashes the password to be stored in the database.

Hashes the password to be stored in the database.

Author

Mathew
public
# hash_password_db( $id, $password, $use_sha1_override = FALSE )

This function takes a password and validates it against an entry in the users table.

This function takes a password and validates it against an entry in the users table.

Author

Mathew
public
# hash_code( $password )

Generates a random salt value for forgotten passwords or any other keys. Uses SHA1.

Generates a random salt value for forgotten passwords or any other keys. Uses SHA1.

Author

Mathew
public
# salt( )

Generates a random salt value.

Generates a random salt value.

Salt generation code taken from https://github.com/ircmaxell/password_compat/blob/master/lib/password.php

Author

Anthony Ferrera
public
# activate( $id, $code = false )

activate

activate

Author

Mathew
public
# deactivate( $id = NULL )

Deactivate

Deactivate

Author

Mathew
public
# clear_forgotten_password_code( $code )
public boolean
# reset_password( $identity, $new )

reset password

reset password

Returns

boolean

Author

Mathew
public boolean
# change_password( $identity, $old, $new )

change password

change password

Returns

boolean

Author

Mathew
public boolean
# username_check( $username = '' )

Checks username

Checks username

Returns

boolean

Author

Mathew
public boolean
# email_check( $email = '' )

Checks email

Checks email

Returns

boolean

Author

Mathew
public boolean
# identity_check( $identity = '' )

Identity check

Identity check

Returns

boolean

Author

Mathew
public boolean
# forgotten_password( $identity )

Insert a forgotten password key.

Insert a forgotten password key.

Returns

boolean

Author

Mathew

Updated

Ryan
52aa456eef8b60ad6754b31fbdcc77bb
public string
# forgotten_password_complete( $code, $salt = FALSE )

Forgotten Password Complete

Forgotten Password Complete

Returns

string

Author

Mathew
public boolean
# register( $identity, $password, $email, $additional_data = array(), $groups = array() )

register

register

Returns

boolean

Author

Mathew
public boolean
# login( $identity, $password, $remember = FALSE )

login

login

Returns

boolean

Author

Mathew
public boolean
# recheck_session( )

recheck_session verifies if the session should be rechecked according to the configuration item recheck_timer. If it does, then it will check if the user is still active

recheck_session verifies if the session should be rechecked according to the configuration item recheck_timer. If it does, then it will check if the user is still active

Returns

boolean
public boolean
# is_max_login_attempts_exceeded( string $identity )

is_max_login_attempts_exceeded Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth)

is_max_login_attempts_exceeded Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth)

Parameters

$identity

Returns

boolean
public integer
# get_attempts_num( string $identity )

Get number of attempts to login occured from given IP-address or identity Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth)

Get number of attempts to login occured from given IP-address or identity Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth)

Parameters

$identity

Returns

integer
public boolean
# is_time_locked_out( $identity )

Get a boolean to determine if an account should be locked out due to exceeded login attempts within a given period

Get a boolean to determine if an account should be locked out due to exceeded login attempts within a given period

Returns

boolean
public integer
# get_last_attempt_time( string $identity )

Get the time of the last time a login attempt occured from given IP-address or identity

Get the time of the last time a login attempt occured from given IP-address or identity

Parameters

$identity

Returns

integer
public
# increase_login_attempts( string $identity )

increase_login_attempts Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth)

increase_login_attempts Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth)

Parameters

$identity
public
# clear_login_attempts( string $identity, $expire_period = 86400 )

clear_login_attempts Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth)

clear_login_attempts Based on code from Tank Auth, by Ilya Konyukhov (https://github.com/ilkon/Tank-Auth)

Parameters

$identity
$expire_period
public
# limit( $limit )
public
# offset( $offset )
public
# where( $where, $value = NULL )
public
# like( $like, $value = NULL, $position = 'both' )
public
# select( $select )
public
# order_by( $by, $order = 'desc' )
public
# row( )
public
# row_array( )
public
# result( )
public
# result_array( )
public
# num_rows( )
public object
# users( $groups = NULL )

users

users

Returns

object
Users

Author

Ben Edmunds
public object
# user( $id = NULL )

user

user

Returns

object

Author

Ben Edmunds
public array
# get_users_groups( $id = FALSE )

get_users_groups

get_users_groups

Returns

array

Author

Ben Edmunds
public boolean
# add_to_group( $group_ids, $user_id = false )

add_to_group

add_to_group

Returns

boolean

Author

Ben Edmunds
public boolean
# remove_from_group( $group_ids = false, $user_id = false )

remove_from_group

remove_from_group

Returns

boolean

Author

Ben Edmunds
public object
# groups( )

groups

groups

Returns

object

Author

Ben Edmunds
public object
# group( $id = NULL )

group

group

Returns

object

Author

Ben Edmunds
public boolean
# update( $id, array $data )

update

update

Returns

boolean

Author

Phil Sturgeon
public boolean
# delete_user( $id )

delete_user

delete_user

Returns

boolean

Author

Phil Sturgeon
public boolean
# update_last_login( $id )

update_last_login

update_last_login

Returns

boolean

Author

Ben Edmunds
public boolean
# set_lang( $lang = 'en' )

set_lang

set_lang

Returns

boolean

Author

Ben Edmunds
public boolean
# set_session( $user )

set_session

set_session

Returns

boolean

Author

jrmadsen67
public boolean
# remember_user( $id )

remember_user

remember_user

Returns

boolean

Author

Ben Edmunds
public boolean
# login_remembered_user( )

login_remembed_user

login_remembed_user

Returns

boolean

Author

Ben Edmunds
public
# create_group( $group_name = FALSE, $group_description = '', $additional_data = array() )

create_group

create_group

Author

aditya menon
public boolean
# update_group( $group_id = FALSE, $group_name = FALSE, $additional_data = array() )

update_group

update_group

Returns

boolean

Author

aditya menon
public boolean
# delete_group( $group_id = FALSE )

delete_group

delete_group

Returns

boolean

Author

aditya menon
public
# set_hook( $event, $name, $class, $method, $arguments )
public
# remove_hook( $event, $name )
public
# remove_hooks( $event )
protected
# _call_hook( $event, $name )
public
# trigger_events( $events )
public
# set_message_delimiters( $start_delimiter, $end_delimiter )

set_message_delimiters

set_message_delimiters

Set the message delimiters

Author

Ben Edmunds
public
# set_error_delimiters( $start_delimiter, $end_delimiter )

set_error_delimiters

set_error_delimiters

Set the error delimiters

Author

Ben Edmunds
public
# set_message( $message )

set_message

set_message

Set a message

Author

Ben Edmunds
public
# messages( )

messages

messages

Get the messages

Author

Ben Edmunds
public array
# messages_array( $langify = TRUE )

messages as array

messages as array

Get the messages as an array

Returns

array

Author

Raul Baldner Junior
public
# clear_messages( )

clear_messages

clear_messages

Clear messages

Author

Ben Edmunds
public
# set_error( $error )

set_error

set_error

Set an error message

Author

Ben Edmunds
public
# errors( )

errors

errors

Get the error message

Author

Ben Edmunds
public array
# errors_array( $langify = TRUE )

errors as array

errors as array

Get the error messages as an array

Returns

array

Author

Raul Baldner Junior
public
# clear_errors( )

clear_errors

clear_errors

Clear Errors

Author

Ben Edmunds
protected
# _filter_data( $table, $data )
protected
# _prepare_ip( $ip_address )

Properties summary

public array $tables

Holds an array of tables used

Holds an array of tables used

# array()
public string $activation_code

activation code

activation code

#
public string $forgotten_password_code

forgotten password key

forgotten password key

#
public string $new_password

new password

new password

#
public string $identity

Identity

Identity

#
public array $_ion_where

Where

Where

# array()
public array $_ion_select

Select

Select

# array()
public array $_ion_like

Like

Like

# array()
public string $_ion_limit

Limit

Limit

# NULL
public string $_ion_offset

Offset

Offset

# NULL
public string $_ion_order_by

Order By

Order By

# NULL
public string $_ion_order

Order

Order

# NULL
protected object $_ion_hooks

Hooks

Hooks

#
protected string $response

Response

Response

# NULL
protected string $messages

message (uses lang file)

message (uses lang file)

#
protected string $errors

error message (uses lang file)

error message (uses lang file)

#
protected string $error_start_delimiter

error start delimiter

error start delimiter

#
protected string $error_end_delimiter

error end delimiter

error end delimiter

#
public array $_cache_user_in_group

caching of users and their groups

caching of users and their groups

# array()
protected array $_cache_groups

caching of groups

caching of groups

# array()
CAFPE Docs API documentation generated by ApiGen