@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | { |
5 | 5 | function ifdef($value, Array $array) |
6 | 6 | { |
7 | - $global = __DIR__ . '/../../../config/global.config.php'; |
|
7 | + $global = __DIR__ . '/../../../config/global.config.php'; |
|
8 | 8 | |
9 | 9 | if (file_exists($global)) |
10 | 10 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | if (!$key) |
29 | 29 | return $in; |
30 | 30 | |
31 | - } while($key); |
|
31 | + } while ($key); |
|
32 | 32 | } |
33 | 33 | else |
34 | 34 | return $value; |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | |
38 | 38 | return [ |
39 | 39 | 'project' => [ |
40 | - 'name' => ifdef('PROJECT NAME', ["project", "name"]), # The name of your project |
|
40 | + 'name' => ifdef('PROJECT NAME', ["project", "name"]), # The name of your project |
|
41 | 41 | ], |
42 | 42 | "authentication" => [ |
43 | - "method" => ifdef('_COOKIE', ["authentication", "method"]), # the method to store credentials (_COOKIE, _SESSION) |
|
44 | - "key" => ifdef('session_id', ["authentication", "key"]), # the key in the array to store credentials |
|
43 | + "method" => ifdef('_COOKIE', ["authentication", "method"]), # the method to store credentials (_COOKIE, _SESSION) |
|
44 | + "key" => ifdef('session_id', ["authentication", "key"]), # the key in the array to store credentials |
|
45 | 45 | ], |
46 | 46 | "database" => [ |
47 | 47 | /** TABLE PREFIX: |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | { |
5 | 5 | function ifdef($value, Array $array) |
6 | 6 | { |
7 | - $global = __DIR__ . '/../../../config/global.config.php'; |
|
7 | + $global = __DIR__ . '/../../../config/global.config.php'; |
|
8 | 8 | |
9 | 9 | if (file_exists($global)) |
10 | 10 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | if (!$key) |
29 | 29 | return $in; |
30 | 30 | |
31 | - } while($key); |
|
31 | + } while ($key); |
|
32 | 32 | } |
33 | 33 | else |
34 | 34 | return $value; |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | |
38 | 38 | return [ |
39 | 39 | 'project' => [ |
40 | - 'name' => ifdef('PROJECT NAME', ["project", "name"]), # The name of your project |
|
40 | + 'name' => ifdef('PROJECT NAME', ["project", "name"]), # The name of your project |
|
41 | 41 | ], |
42 | 42 | "authentication" => [ |
43 | - "method" => ifdef('_COOKIE', ["authentication", "method"]), # the method to store credentials (_COOKIE, _SESSION) |
|
44 | - "key" => ifdef('session_id', ["authentication", "key"]), # the key in the array to store credentials |
|
43 | + "method" => ifdef('_COOKIE', ["authentication", "method"]), # the method to store credentials (_COOKIE, _SESSION) |
|
44 | + "key" => ifdef('session_id', ["authentication", "key"]), # the key in the array to store credentials |
|
45 | 45 | ], |
46 | 46 | "database" => [ |
47 | 47 | /** TABLE PREFIX: |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | { |
5 | 5 | function ifdef($value, Array $array) |
6 | 6 | { |
7 | - $global = __DIR__ . '/../../../config/global.config.php'; |
|
7 | + $global = __DIR__ . '/../../../config/global.config.php'; |
|
8 | 8 | |
9 | 9 | if (file_exists($global)) |
10 | 10 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | if (!$key) |
29 | 29 | return $in; |
30 | 30 | |
31 | - } while($key); |
|
31 | + } while ($key); |
|
32 | 32 | } |
33 | 33 | else |
34 | 34 | return $value; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | return [ |
39 | 39 | 'project' => [ |
40 | - 'name' => ifdef('PROJECT NAME', ["project", "name"]), # The name of your project |
|
40 | + 'name' => ifdef('PROJECT NAME', ["project", "name"]), # The name of your project |
|
41 | 41 | ], |
42 | 42 | 'mail' => [ |
43 | 43 | /** CHECKING: |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | "host" => ifdef('localhost', ["mail", "host"]) |
52 | 52 | ], |
53 | 53 | "authentication" => [ |
54 | - "method" => ifdef('_COOKIE', ["authentication", "method"]), # the method to store credentials (_COOKIE, _SESSION) |
|
55 | - "key" => ifdef('session_id', ["authentication", "key"]), # the key in the array to store credentials |
|
54 | + "method" => ifdef('_COOKIE', ["authentication", "method"]), # the method to store credentials (_COOKIE, _SESSION) |
|
55 | + "key" => ifdef('session_id', ["authentication", "key"]), # the key in the array to store credentials |
|
56 | 56 | /** AUTH TYPE: |
57 | 57 | * db_table: get credentials from a table in a database |
58 | 58 | * db_user: get credentials from database users (database authentication) |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * a database and checks the specified credentials. Theses will checked only if the AUTH TYPE is db_table. |
64 | 64 | */ |
65 | 65 | "gateway" => [ |
66 | - "entity" => "USER", # Table name (without prefix if exists) |
|
66 | + "entity" => "USER", # Table name (without prefix if exists) |
|
67 | 67 | /** CREDENTIALS: |
68 | 68 | * The field names of credentials in the table. |
69 | 69 | */ |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | */ |
82 | 82 | "table_info" => [ |
83 | 83 | "columns" => [ |
84 | - "id_field" => "USER_ID", # often the primary key |
|
85 | - "state_field" => "USER_STATE_ID", # required if mail_checking is enabled |
|
84 | + "id_field" => "USER_ID", # often the primary key |
|
85 | + "state_field" => "USER_STATE_ID", # required if mail_checking is enabled |
|
86 | 86 | "email_field" => "EMAIL" # required registration process |
87 | 87 | ], |
88 | 88 | "column_values" => [ |
89 | 89 | "state_field" => [ |
90 | - "pending_email" => 1, # required if mail_checking is enabled |
|
91 | - "user_active" => 2, # required if mail_checking is enabled |
|
90 | + "pending_email" => 1, # required if mail_checking is enabled |
|
91 | + "user_active" => 2, # required if mail_checking is enabled |
|
92 | 92 | ] |
93 | 93 | ] |
94 | 94 | ] |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $table = $this->getEntity()->getTableName(); |
17 | 17 | |
18 | 18 | $config = include 'module/Auth/config/user.config.php'; |
19 | - $id_field = $config["authentication"]["gateway"]["table_info"]["columns"]["id_field"]; |
|
19 | + $id_field = $config["authentication"]["gateway"]["table_info"]["columns"]["id_field"]; |
|
20 | 20 | |
21 | 21 | $sql = "SELECT CASE WHEN MAX($id_field) IS NULL THEN 1 ELSE MAX($id_field) + 1 END AS USER_ID FROM $table"; |
22 | 22 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function getUserById($id) |
38 | 38 | { |
39 | 39 | $config = include 'module/Auth/config/user.config.php'; |
40 | - $id_field = $config["authentication"]["gateway"]["table_info"]["columns"]["id_field"]; |
|
40 | + $id_field = $config["authentication"]["gateway"]["table_info"]["columns"]["id_field"]; |
|
41 | 41 | |
42 | 42 | $rowset = $this->select([ |
43 | 43 | $id_field => $id |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | public function getUserByUsernameCredential($username) |
70 | 70 | { |
71 | 71 | $config = include 'module/Auth/config/user.config.php'; |
72 | - $username_credential = $config["authentication"]["gateway"]["credentials"]["username"]; |
|
72 | + $username_credential = $config["authentication"]["gateway"]["credentials"]["username"]; |
|
73 | 73 | |
74 | 74 | $rowset = $this->select([ |
75 | 75 | $username_credential => $username |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $http = new Http(); |
94 | 94 | $http->writeStatus($http::HTTP_METHOD_NOT_ALLOWED); |
95 | 95 | |
96 | - die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED .' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!'); |
|
96 | + die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED . ' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!'); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | $this->checkSession(); |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | $data = []; |
113 | 113 | |
114 | 114 | # environment settings |
115 | - $post = $this->getPost(); # catch $_POST |
|
116 | - $this->setTerminal(true); # set terminal |
|
115 | + $post = $this->getPost(); # catch $_POST |
|
116 | + $this->setTerminal(true); # set terminal |
|
117 | 117 | |
118 | 118 | # TRY-CATCH-BLOCK |
119 | 119 | try { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $http = new Http(); |
125 | 125 | $http->writeStatus($http::HTTP_METHOD_NOT_ALLOWED); |
126 | 126 | |
127 | - die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED .' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!'); |
|
127 | + die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED . ' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!'); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | # STANDARD VALIDATIONS [check needed arguments] |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $http = new Http(); |
137 | 137 | $http->writeStatus($http::HTTP_BAD_REQUEST); |
138 | 138 | |
139 | - die('Error ' . $http::HTTP_BAD_REQUEST .' (' . $http->getStatusText($http::HTTP_BAD_REQUEST) . ')!!'); |
|
139 | + die('Error ' . $http::HTTP_BAD_REQUEST . ' (' . $http->getStatusText($http::HTTP_BAD_REQUEST) . ')!!'); |
|
140 | 140 | } |
141 | 141 | }); |
142 | 142 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | |
248 | 248 | $this->getUserAdapter()->insert($user); |
249 | 249 | |
250 | - $link = $_SERVER["REQUEST_SCHEME"] .'://'. $_SERVER["HTTP_HOST"] . $this->getBasePath() . "/public/Auth/SingUp/verifyEmail/user/" . $post["username"] . "/token/" . $token; |
|
250 | + $link = $_SERVER["REQUEST_SCHEME"] . '://' . $_SERVER["HTTP_HOST"] . $this->getBasePath() . "/public/Auth/SingUp/verifyEmail/user/" . $post["username"] . "/token/" . $token; |
|
251 | 251 | |
252 | 252 | if ($data["mail"]) |
253 | 253 | { |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | $http = new Http(); |
339 | 339 | $http->writeStatus($http::HTTP_METHOD_NOT_ALLOWED); |
340 | 340 | |
341 | - die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED .' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!'); |
|
341 | + die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED . ' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!'); |
|
342 | 342 | } |
343 | 343 | |
344 | 344 | # STANDARD VALIDATIONS [check needed arguments] |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | $http = new Http(); |
351 | 351 | $http->writeStatus($http::HTTP_BAD_REQUEST); |
352 | 352 | |
353 | - die('Error ' . $http::HTTP_BAD_REQUEST .' (' . $http->getStatusText($http::HTTP_BAD_REQUEST) . ')!!'); |
|
353 | + die('Error ' . $http::HTTP_BAD_REQUEST . ' (' . $http->getStatusText($http::HTTP_BAD_REQUEST) . ')!!'); |
|
354 | 354 | } |
355 | 355 | }); |
356 | 356 | |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | foreach ($errors as $errno => $error) |
438 | 438 | { |
439 | 439 | $errorInformation .= |
440 | - "<strong style='color: #a94442'>". |
|
440 | + "<strong style='color: #a94442'>" . |
|
441 | 441 | $method |
442 | 442 | . "</strong>: <span style='color: #e24f4c'>{$error}</span> \n<br />"; |
443 | 443 | } |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | { |
5 | 5 | function ifdef($value, Array $array) |
6 | 6 | { |
7 | - $global = __DIR__ . '/../../../config/global.config.php'; |
|
7 | + $global = __DIR__ . '/../../../config/global.config.php'; |
|
8 | 8 | |
9 | 9 | if (file_exists($global)) |
10 | 10 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | if (!$key) |
29 | 29 | return $in; |
30 | 30 | |
31 | - } while($key); |
|
31 | + } while ($key); |
|
32 | 32 | } |
33 | 33 | else |
34 | 34 | return $value; |
@@ -37,6 +37,6 @@ discard block |
||
37 | 37 | |
38 | 38 | return [ |
39 | 39 | 'project' => [ |
40 | - 'name' => ifdef('PROTOTYPE4', ["project", "name"]), # The name of your project |
|
40 | + 'name' => ifdef('PROTOTYPE4', ["project", "name"]), # The name of your project |
|
41 | 41 | ], |
42 | 42 | ]; |
43 | 43 | \ No newline at end of file |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | 'project' => [ |
5 | - 'id' => 'id6447896', # Unique ID for the project |
|
5 | + 'id' => 'id6447896', # Unique ID for the project |
|
6 | 6 | 'name' => 'SQLWebManager' # The name of your project |
7 | 7 | ], |
8 | 8 | 'mail' => [ |
@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | "host" => "" |
11 | 11 | ], |
12 | 12 | "authentication" => [ |
13 | - "method" => "_COOKIE", # the method to store credentials (_COOKIE, _SESSION) |
|
14 | - "key" => "session_id6448654", # the key in the array to store credentials |
|
13 | + "method" => "_COOKIE", # the method to store credentials (_COOKIE, _SESSION) |
|
14 | + "key" => "session_id6448654", # the key in the array to store credentials |
|
15 | 15 | ], |
16 | 16 | "database" => [ |
17 | 17 | /** TABLE PREFIX: |