Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit bcdd354

Browse files
committed
[UPD] change structure for Ion-Auth
1 parent 6572963 commit bcdd354

11 files changed

Lines changed: 1152 additions & 623 deletions

File tree

application/core/MY_Controller.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public function __construct()
1010
/* COMMON :: ADMIN & PUBLIC */
1111
/* Load */
1212
$this->load->database();
13+
$this->load->add_package_path(APPPATH . 'third_party/ion_auth/');
1314
$this->load->config('common/dp_config');
1415
$this->load->config('common/dp_language');
1516
$this->load->library(array('form_validation', 'ion_auth', 'template', 'common/mobile_detect'));

application/libraries/Bcrypt.php

Lines changed: 0 additions & 114 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>403 Forbidden</title>
5+
</head>
6+
<body>
7+
8+
<p>Directory access is forbidden.</p>
9+
10+
</body>
11+
</html>

application/config/ion_auth.php renamed to application/third_party/ion_auth/config/ion_auth.php

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
1+
<?php
22
/**
3-
* Name: Ion Auth
4-
*
5-
* Version: 2.5.2
6-
*
7-
* Author: Ben Edmunds
8-
9-
* @benedmunds
10-
*
11-
* Added Awesomeness: Phil Sturgeon
12-
*
13-
* Location: http://github.com/benedmunds/CodeIgniter-Ion-Auth
14-
*
15-
* Created: 10.01.2009
16-
*
17-
* Description: Modified auth system based on redux_auth with extensive customization. This is basically what Redux Auth 2 should be.
18-
* Original Author name has been kept but that does not mean that the method has not been modified.
19-
*
20-
* Requirements: PHP5 or above
21-
*
22-
*/
3+
* Name: Ion Auth
4+
* Author: Ben Edmunds
5+
6+
* @benedmunds
7+
*
8+
* Added Awesomeness: Phil Sturgeon
9+
*
10+
* Created: 10.01.2009
11+
*
12+
* Description: Modified auth system based on redux_auth with extensive customization. This is basically what Redux Auth 2 should be.
13+
* Original Author name has been kept but that does not mean that the method has not been modified.
14+
*
15+
* Requirements: PHP5 or above
16+
*
17+
* @package CodeIgniter-Ion-Auth
18+
* @author Ben Edmunds
19+
* @link http://github.com/benedmunds/CodeIgniter-Ion-Auth
20+
* @filesource
21+
*/
22+
defined('BASEPATH') OR exit('No direct script access allowed');
2323

2424
/*
2525
| -------------------------------------------------------------------------
@@ -67,7 +67,7 @@
6767
| Versions 5.3.7 or greater should use the default of "$2y$".
6868
*/
6969
$config['hash_method'] = 'bcrypt'; // sha1 or bcrypt, bcrypt is STRONGLY recommended
70-
$config['default_rounds'] = 8; // This does not apply if random_rounds is set to true
70+
$config['default_rounds'] = 8; // This does not apply if random_rounds is set to true
7171
$config['random_rounds'] = FALSE;
7272
$config['min_rounds'] = 5;
7373
$config['max_rounds'] = 9;
@@ -94,11 +94,15 @@
9494
$config['remember_users'] = TRUE; // Allow users to be remembered and enable auto-login
9595
$config['user_expire'] = 86500; // How long to remember the user (seconds). Set to zero for no expiration
9696
$config['user_extend_on_login'] = FALSE; // Extend the users cookies every time they auto-login
97-
$config['track_login_attempts'] = FALSE; // Track the number of failed login attempts for each user or ip.
97+
$config['track_login_attempts'] = TRUE; // Track the number of failed login attempts for each user or ip.
9898
$config['track_login_ip_address'] = TRUE; // Track login attempts by IP Address, if FALSE will track based on identity. (Default: TRUE)
9999
$config['maximum_login_attempts'] = 3; // The maximum number of failed login attempts.
100-
$config['lockout_time'] = 600; // The number of seconds to lockout an account due to exceeded attempts
101-
$config['forgot_password_expiration'] = 0; // The number of milliseconds after which a forgot password request will expire. If set to 0, forgot password requests will not expire.
100+
$config['lockout_time'] = 600; /* The number of seconds to lockout an account due to exceeded attempts
101+
You should not use a value below 60 (1 minute) */
102+
$config['forgot_password_expiration'] = 0; // The number of seconds after which a forgot password request will expire. If set to 0, forgot password requests will not expire.
103+
$config['recheck_timer'] = 0; /* The number of seconds after which the session is checked again against database to see if the user still exists and is active.
104+
Leave 0 if you don't want session recheck. if you really think you need to recheck the session against database, we would
105+
recommend a higher value, as this would affect performance */
102106

103107
/*
104108
| -------------------------------------------------------------------------
@@ -180,6 +184,3 @@
180184
$config['message_end_delimiter'] = '</p>'; // Message end delimiter
181185
$config['error_start_delimiter'] = '<p>'; // Error message start delimiter
182186
$config['error_end_delimiter'] = '</p>'; // Error message end delimiter
183-
184-
/* End of file ion_auth.php */
185-
/* Location: ./application/config/ion_auth.php */
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>403 Forbidden</title>
5+
</head>
6+
<body>
7+
8+
<p>Directory access is forbidden.</p>
9+
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)