@@ -108,7 +108,7 @@ |
||
108 | 108 | */ |
109 | 109 | public function isRuleValid(string $ruleName) : bool { |
110 | 110 | $isValid = FALSE; |
111 | - if(is_string($ruleName) && $this->has_rule($ruleName)){ |
|
111 | + if(is_string($ruleName) && $this->has_rule($ruleName)) { |
|
112 | 112 | $isValid = !array_key_exists($ruleName, $this->error_array()); |
113 | 113 | } |
114 | 114 | return $isValid; |
@@ -43,8 +43,7 @@ discard block |
||
43 | 43 | public function valid_password(string $password) : bool { |
44 | 44 | if(!($isValid = $this->min_length($password, $this->CI->config->item('min_password_length', 'ion_auth')))) { |
45 | 45 | $this->set_message('valid_password', 'The password is too short!'); |
46 | - } |
|
47 | - elseif(!($isValid = $this->max_length($password, $this->CI->config->item('max_password_length', 'ion_auth')))) { |
|
46 | + } elseif(!($isValid = $this->max_length($password, $this->CI->config->item('max_password_length', 'ion_auth')))) { |
|
48 | 47 | $this->set_message('valid_password', 'The password is too long!'); |
49 | 48 | } |
50 | 49 | return $isValid; |
@@ -108,7 +107,7 @@ discard block |
||
108 | 107 | */ |
109 | 108 | public function isRuleValid(string $ruleName) : bool { |
110 | 109 | $isValid = FALSE; |
111 | - if(is_string($ruleName) && $this->has_rule($ruleName)){ |
|
110 | + if(is_string($ruleName) && $this->has_rule($ruleName)) { |
|
112 | 111 | $isValid = !array_key_exists($ruleName, $this->error_array()); |
113 | 112 | } |
114 | 113 | return $isValid; |
@@ -1,4 +1,4 @@ |
||
1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
2 | 2 | |
3 | 3 | include APPPATH.'config/database.php'; //CI doesn't do this by default? |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
2 | 2 | |
3 | 3 | class MY_Security extends CI_Security { |
4 | 4 | public $verified = TRUE; |
@@ -1,4 +1,4 @@ |
||
1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
2 | 2 | |
3 | 3 | include APPPATH.'config/database.php'; //CI doesn't do this by default? |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
2 | 2 | |
3 | 3 | include APPPATH.'config/database.php'; //CI doesn't do this by default? |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
2 | 2 | |
3 | 3 | class Dashboard extends User_Controller { |
4 | 4 | public function __construct() { |
@@ -9,7 +9,9 @@ |
||
9 | 9 | $this->header_data['title'] = 'Index'; |
10 | 10 | $this->header_data['page'] = 'index'; |
11 | 11 | |
12 | - if($this->User->logged_in()) redirect('user/dashboard'); |
|
12 | + if($this->User->logged_in()) { |
|
13 | + redirect('user/dashboard'); |
|
14 | + } |
|
13 | 15 | $this->_render_page('FrontPage'); |
14 | 16 | } |
15 | 17 | } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
2 | 2 | |
3 | 3 | class FrontPage extends User_Controller { |
4 | 4 | public function __construct() { |