@@ -48,7 +48,7 @@ |
||
| 48 | 48 | * Initialization to get controller variable |
| 49 | 49 | * |
| 50 | 50 | * @param array $rules Array of rules for permissions. |
| 51 | -* @return string '0' if user / group doesn't have permission, 1 if has permission |
|
| 51 | +* @return null|boolean '0' if user / group doesn't have permission, 1 if has permission |
|
| 52 | 52 | */ |
| 53 | 53 | public function allow ($rules) { |
| 54 | 54 | $user_id = $this->session->read('Auth.User.id'); |
@@ -109,8 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | header("Location: " . $redirect); |
| 111 | 111 | exit; |
| 112 | - } |
|
| 113 | - else{ |
|
| 112 | + } else{ |
|
| 114 | 113 | $bool = false; |
| 115 | 114 | } |
| 116 | 115 | } |
@@ -130,8 +129,7 @@ discard block |
||
| 130 | 129 | |
| 131 | 130 | header("Location: " . $redirect); |
| 132 | 131 | exit; |
| 133 | - } |
|
| 134 | - else{ |
|
| 132 | + } else{ |
|
| 135 | 133 | $bool = false; |
| 136 | 134 | } |
| 137 | 135 | } |