@@ -14,7 +14,7 @@ |
||
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | if (!isAdmin()) { |
17 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
17 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
18 | 18 | exit; |
19 | 19 | } |
20 | 20 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | if ($method == 'remove') { |
26 | 26 | removeSeries($seriesId); |
27 | 27 | header('Location: series.php'); // Remove query string from URL |
28 | - exit; |
|
28 | + exit; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | // If the form has been submitted, then we need to handle the data. |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | </form> |
143 | 143 | </div><!-- /.box --> |
144 | 144 | <?php |
145 | - if (isAdmin()) { |
|
146 | - ?> |
|
145 | + if (isAdmin()) { |
|
146 | + ?> |
|
147 | 147 | <div id="right"> |
148 | 148 | <div class="item"><a href="settings.php">Back to settings</a></div> |
149 | 149 | <?php |
150 | - } ?> |
|
150 | + } ?> |
|
151 | 151 | <?php include 'includes/footer.php'; ?> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | if (!isAdmin()) { |
17 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
17 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
18 | 18 | exit; |
19 | 19 | } |
20 | 20 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $sql = "UPDATE cr_eventGroups SET name = '$name', description = '$description' WHERE id = '$editid'"; |
41 | 41 | } |
42 | 42 | if (!mysqli_query(db(), $sql)) { |
43 | - die('Error: '.mysqli_error(db())); |
|
43 | + die('Error: ' . mysqli_error(db())); |
|
44 | 44 | } |
45 | 45 | } else { |
46 | 46 | $name = $_POST['seriesName']; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } else { |
55 | 55 | $sql = ("INSERT INTO cr_eventGroups (name, description) VALUES ('$name', '$description')"); |
56 | 56 | if (!mysqli_query(db(), $sql)) { |
57 | - die('Error: '.mysqli_error(db())); |
|
57 | + die('Error: ' . mysqli_error(db())); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | // After we have inserted the data, we want to head back to the main users page |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | |
98 | 98 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
99 | 99 | $seriesId = $row['id']; |
100 | - echo "<span id='".$seriesId."' class='edit'><strong>".$row['name'].'</strong></span>'; |
|
101 | - echo " <a href='series.php?method=remove&series=".$seriesId."'><i class='fa fa-close'></i></a><br />"; |
|
102 | - echo "<p id='".$seriesId."' class='edit'>".$row['description'].'</p>'; |
|
100 | + echo "<span id='" . $seriesId . "' class='edit'><strong>" . $row['name'] . '</strong></span>'; |
|
101 | + echo " <a href='series.php?method=remove&series=" . $seriesId . "'><i class='fa fa-close'></i></a><br />"; |
|
102 | + echo "<p id='" . $seriesId . "' class='edit'>" . $row['description'] . '</p>'; |
|
103 | 103 | echo '<hr />'; |
104 | 104 | } ?> |
105 | 105 | </div><!-- /.box-body --> |
@@ -30,24 +30,24 @@ |
||
30 | 30 | switch ($_POST['action']) { |
31 | 31 | case 'approve': |
32 | 32 | $userId = approvePendingUser($id); |
33 | - mailNewUser($userId); |
|
34 | - header('Location: addUser.php?action=edit&user='.$userId); |
|
35 | - break; |
|
33 | + mailNewUser($userId); |
|
34 | + header('Location: addUser.php?action=edit&user='.$userId); |
|
35 | + break; |
|
36 | 36 | case 'merge': |
37 | 37 | $existingUserId = $_POST['existingUser']; |
38 | - $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
|
39 | - mergePendingUserWithUserId($id, $existingUserId); |
|
40 | - mailNewUser($existingUserId); |
|
41 | - header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
42 | - break; |
|
38 | + $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
|
39 | + mergePendingUserWithUserId($id, $existingUserId); |
|
40 | + mailNewUser($existingUserId); |
|
41 | + header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
42 | + break; |
|
43 | 43 | case 'decline': |
44 | 44 | declinePendingUser($id); |
45 | - break; |
|
45 | + break; |
|
46 | 46 | |
47 | 47 | default: |
48 | 48 | // code... |
49 | 49 | break; |
50 | - } |
|
50 | + } |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | if (empty($id)) { |
@@ -28,25 +28,25 @@ |
||
28 | 28 | $id = filter_var($id, FILTER_SANITIZE_NUMBER_INT); |
29 | 29 | |
30 | 30 | switch ($_POST['action']) { |
31 | - case 'approve': |
|
32 | - $userId = approvePendingUser($id); |
|
33 | - mailNewUser($userId); |
|
34 | - header('Location: addUser.php?action=edit&user='.$userId); |
|
35 | - break; |
|
36 | - case 'merge': |
|
37 | - $existingUserId = $_POST['existingUser']; |
|
38 | - $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
|
39 | - mergePendingUserWithUserId($id, $existingUserId); |
|
40 | - mailNewUser($existingUserId); |
|
41 | - header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
42 | - break; |
|
43 | - case 'decline': |
|
44 | - declinePendingUser($id); |
|
45 | - break; |
|
46 | - |
|
47 | - default: |
|
48 | - // code... |
|
49 | - break; |
|
31 | + case 'approve': |
|
32 | + $userId = approvePendingUser($id); |
|
33 | + mailNewUser($userId); |
|
34 | + header('Location: addUser.php?action=edit&user='.$userId); |
|
35 | + break; |
|
36 | + case 'merge': |
|
37 | + $existingUserId = $_POST['existingUser']; |
|
38 | + $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
|
39 | + mergePendingUserWithUserId($id, $existingUserId); |
|
40 | + mailNewUser($existingUserId); |
|
41 | + header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
42 | + break; |
|
43 | + case 'decline': |
|
44 | + declinePendingUser($id); |
|
45 | + break; |
|
46 | + |
|
47 | + default: |
|
48 | + // code... |
|
49 | + break; |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | if (!isAdmin()) { |
17 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
17 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
18 | 18 | exit; |
19 | 19 | } |
20 | 20 | |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | case 'approve': |
32 | 32 | $userId = approvePendingUser($id); |
33 | 33 | mailNewUser($userId); |
34 | - header('Location: addUser.php?action=edit&user='.$userId); |
|
34 | + header('Location: addUser.php?action=edit&user=' . $userId); |
|
35 | 35 | break; |
36 | 36 | case 'merge': |
37 | 37 | $existingUserId = $_POST['existingUser']; |
38 | 38 | $existingUserId = filter_var($existingUserId, FILTER_SANITIZE_NUMBER_INT); |
39 | 39 | mergePendingUserWithUserId($id, $existingUserId); |
40 | 40 | mailNewUser($existingUserId); |
41 | - header('Location: addUser.php?action=edit&user='.$existingUserId); |
|
41 | + header('Location: addUser.php?action=edit&user=' . $existingUserId); |
|
42 | 42 | break; |
43 | 43 | case 'decline': |
44 | 44 | declinePendingUser($id); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | <div class="box box-primary"> |
91 | 91 | <div class="box-header"> |
92 | 92 | <h2 class="box-title"> |
93 | - <?php echo $user->approved ? 'Approved' : ($user->declined ? 'Declined' : 'Pending') ?>: <?php echo $user->firstName.' '.$user->lastName ?> |
|
93 | + <?php echo $user->approved ? 'Approved' : ($user->declined ? 'Declined' : 'Pending') ?>: <?php echo $user->firstName . ' ' . $user->lastName ?> |
|
94 | 94 | </h2> |
95 | 95 | </div> |
96 | 96 | <div class="box-body"> |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | <?php |
132 | 132 | $users = allUsersNames(); |
133 | 133 | foreach ($users as $existingUser): ?> |
134 | - <option value="<?php echo $existingUser->id?>" <?php echo($existingUser->firstName == $user->firstName) && ($existingUser->lastName == $user->lastName) ? "selected='selected'" : '' ?>><?php echo $existingUser->firstName.' '.$existingUser->lastName ?></option> |
|
134 | + <option value="<?php echo $existingUser->id?>" <?php echo($existingUser->firstName == $user->firstName) && ($existingUser->lastName == $user->lastName) ? "selected='selected'" : '' ?>><?php echo $existingUser->firstName . ' ' . $existingUser->lastName ?></option> |
|
135 | 135 | <?php endforeach; ?> |
136 | 136 | </select> |
137 | 137 | </div> |
@@ -56,7 +56,7 @@ |
||
56 | 56 | $statusMessage = 'Sent successfully'; |
57 | 57 | } else { |
58 | 58 | foreach ($sent as $errorMessage) { |
59 | - $statusMessage .= '<p>'.$errorMessage.'</p>'; |
|
59 | + $statusMessage .= '<p>' . $errorMessage . '</p>'; |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | exit; |
34 | 34 | } |
35 | 35 | if (!isAdmin()) { |
36 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
36 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
37 | 37 | exit; |
38 | 38 | } |
39 | 39 | |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | skin='$skin'"; |
166 | 166 | |
167 | 167 | if (!mysqli_query(db(), $sql)) { |
168 | - die('Error: '.mysqli_error(db())); |
|
168 | + die('Error: ' . mysqli_error(db())); |
|
169 | 169 | } |
170 | 170 | header('Location: settings.php'); |
171 | 171 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | <!-- Content Header (Page header) --> |
193 | 193 | <section class="content-header"> |
194 | 194 | <h1>Settings |
195 | - <?php echo '<small>v'.$row['version'].'</small>'; ?> |
|
195 | + <?php echo '<small>v' . $row['version'] . '</small>'; ?> |
|
196 | 196 | </h1> |
197 | 197 | <ol class="breadcrumb"> |
198 | 198 | <li><a href="<?php echo siteSettings()->getSiteUrl() ?>"><i class="fa fa-dashboard"></i> Home</a></li> |
@@ -191,10 +191,10 @@ discard block |
||
191 | 191 | $up = $group - 1; |
192 | 192 | echo '<div><strong>'.$groupname.'</strong><br />'; |
193 | 193 | } |
194 | - // Print text input box if a role exists for the group. |
|
195 | - // Allows user to update role names and move roles between groups |
|
196 | - if ($roleId) { |
|
197 | - ?> |
|
194 | + // Print text input box if a role exists for the group. |
|
195 | + // Allows user to update role names and move roles between groups |
|
196 | + if ($roleId) { |
|
197 | + ?> |
|
198 | 198 | <div class='input-group'> |
199 | 199 | <input type="hidden" name="roleId[<?php echo $row['roleId'] ?>]" value="<?php echo $row['roleId'] ?>" /> |
200 | 200 | <input class='form-control' name='roleName[]' value="<?php echo $row['roleName'] ?>" maxlength="15" /> |
@@ -209,9 +209,9 @@ discard block |
||
209 | 209 | </div> |
210 | 210 | </div><!-- /.input-group --> |
211 | 211 | <?php |
212 | - } else { |
|
213 | - echo "<p>No roles (<a href='roles.php?method=delete&group=$group'>Delete group</a>)</p>"; |
|
214 | - } |
|
212 | + } else { |
|
213 | + echo "<p>No roles (<a href='roles.php?method=delete&group=$group'>Delete group</a>)</p>"; |
|
214 | + } |
|
215 | 215 | } ?> |
216 | 216 | </div> |
217 | 217 | </fieldset> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | if (!isAdmin()) { |
17 | - header('Location: error.php?no=100&page='.basename($_SERVER['SCRIPT_FILENAME'])); |
|
17 | + header('Location: error.php?no=100&page=' . basename($_SERVER['SCRIPT_FILENAME'])); |
|
18 | 18 | exit; |
19 | 19 | } |
20 | 20 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | if ($role && $assignTo) { |
35 | 35 | $sql = "UPDATE cr_roles r SET r.groupId = '$assignTo' WHERE r.id = '$role'"; |
36 | 36 | if (!mysqli_query(db(), $sql)) { |
37 | - die('Error: '.mysqli_error(db())); |
|
37 | + die('Error: ' . mysqli_error(db())); |
|
38 | 38 | } |
39 | 39 | header('Location: roles.php'); |
40 | 40 | exit; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $sql = "INSERT INTO cr_roles (name, description, rehersalId, groupId) |
71 | 71 | VALUES ('$newrole', '$newrole', $rehersal, $groupId)"; |
72 | 72 | if (!mysqli_query(db(), $sql)) { |
73 | - die('Error: '.mysqli_error(db())); |
|
73 | + die('Error: ' . mysqli_error(db())); |
|
74 | 74 | } |
75 | 75 | } elseif ($method == 'newgroup') { |
76 | 76 | $groupId = $_POST['groups']; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $sql = "INSERT INTO cr_groups (name, description) |
87 | 87 | VALUES ('$newgroup', '$newgroup')"; |
88 | 88 | if (!mysqli_query(db(), $sql)) { |
89 | - die('Error: '.mysqli_error(db())); |
|
89 | + die('Error: ' . mysqli_error(db())); |
|
90 | 90 | } |
91 | 91 | } else { |
92 | 92 | // Handle renaming of the roles |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | $i = 1; |
120 | 120 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
121 | 121 | if ($type == 'option') { |
122 | - $list = $list."<option value='".$row['id']."'>".$row['name'].'</option>'; |
|
122 | + $list = $list . "<option value='" . $row['id'] . "'>" . $row['name'] . '</option>'; |
|
123 | 123 | } elseif ($type == 'li') { |
124 | - $list = $list.'<li>'.$row['name'].'</li>'; |
|
124 | + $list = $list . '<li>' . $row['name'] . '</li>'; |
|
125 | 125 | } elseif ($type == 'li-a') { |
126 | - $list = $list."<li><a href='roles.php?role=".$roleId.'&assignto='.$row['id']."'>".$row['name'].'</a></li>'; |
|
126 | + $list = $list . "<li><a href='roles.php?role=" . $roleId . '&assignto=' . $row['id'] . "'>" . $row['name'] . '</a></li>'; |
|
127 | 127 | } |
128 | 128 | $i++; |
129 | 129 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $group = $row['groupId']; |
190 | 190 | $down = $group + 1; |
191 | 191 | $up = $group - 1; |
192 | - echo '<div><strong>'.$groupname.'</strong><br />'; |
|
192 | + echo '<div><strong>' . $groupname . '</strong><br />'; |
|
193 | 193 | } |
194 | 194 | // Print text input box if a role exists for the group. |
195 | 195 | // Allows user to update role names and move roles between groups |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | session_start(); |
16 | 16 | |
17 | 17 | $fb = new Facebook\Facebook([ |
18 | - 'app_id' => $config['auth']['facebook']['appId'], |
|
19 | - 'app_secret' => $config['auth']['facebook']['appSecret'], |
|
20 | - 'default_graph_version' => 'v2.2', |
|
21 | - ]); |
|
18 | + 'app_id' => $config['auth']['facebook']['appId'], |
|
19 | + 'app_secret' => $config['auth']['facebook']['appSecret'], |
|
20 | + 'default_graph_version' => 'v2.2', |
|
21 | + ]); |
|
22 | 22 | |
23 | 23 | $helper = $fb->getRedirectLoginHelper(); |
24 | 24 | |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | $accessToken = $helper->getAccessToken(); |
27 | 27 | } catch (Facebook\Exceptions\FacebookResponseException $e) { |
28 | 28 | // When Graph returns an error |
29 | - echo 'Graph returned an error: '.$e->getMessage(); |
|
29 | + echo 'Graph returned an error: '.$e->getMessage(); |
|
30 | 30 | exit; |
31 | 31 | } catch (Facebook\Exceptions\FacebookSDKException $e) { |
32 | 32 | // When validation fails or other local issues |
33 | - echo 'Facebook SDK returned an error: '.$e->getMessage(); |
|
33 | + echo 'Facebook SDK returned an error: '.$e->getMessage(); |
|
34 | 34 | exit; |
35 | 35 | } |
36 | 36 | |
@@ -62,12 +62,12 @@ discard block |
||
62 | 62 | |
63 | 63 | if (!$accessToken->isLongLived()) { |
64 | 64 | // Exchanges a short-lived access token for a long-lived one |
65 | - try { |
|
66 | - $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken); |
|
67 | - } catch (Facebook\Exceptions\FacebookSDKException $e) { |
|
68 | - echo '<p>Error getting long-lived access token: '.$helper->getMessage()."</p>\n\n"; |
|
69 | - exit; |
|
70 | - } |
|
65 | + try { |
|
66 | + $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken); |
|
67 | + } catch (Facebook\Exceptions\FacebookSDKException $e) { |
|
68 | + echo '<p>Error getting long-lived access token: '.$helper->getMessage()."</p>\n\n"; |
|
69 | + exit; |
|
70 | + } |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | $_SESSION['fb_access_token'] = (string) $accessToken; |
@@ -26,21 +26,21 @@ discard block |
||
26 | 26 | $accessToken = $helper->getAccessToken(); |
27 | 27 | } catch (Facebook\Exceptions\FacebookResponseException $e) { |
28 | 28 | // When Graph returns an error |
29 | - echo 'Graph returned an error: '.$e->getMessage(); |
|
29 | + echo 'Graph returned an error: ' . $e->getMessage(); |
|
30 | 30 | exit; |
31 | 31 | } catch (Facebook\Exceptions\FacebookSDKException $e) { |
32 | 32 | // When validation fails or other local issues |
33 | - echo 'Facebook SDK returned an error: '.$e->getMessage(); |
|
33 | + echo 'Facebook SDK returned an error: ' . $e->getMessage(); |
|
34 | 34 | exit; |
35 | 35 | } |
36 | 36 | |
37 | 37 | if (!isset($accessToken)) { |
38 | 38 | if ($helper->getError()) { |
39 | 39 | header('HTTP/1.0 401 Unauthorized'); |
40 | - echo 'Error: '.$helper->getError()."\n"; |
|
41 | - echo 'Error Code: '.$helper->getErrorCode()."\n"; |
|
42 | - echo 'Error Reason: '.$helper->getErrorReason()."\n"; |
|
43 | - echo 'Error Description: '.$helper->getErrorDescription()."\n"; |
|
40 | + echo 'Error: ' . $helper->getError() . "\n"; |
|
41 | + echo 'Error Code: ' . $helper->getErrorCode() . "\n"; |
|
42 | + echo 'Error Reason: ' . $helper->getErrorReason() . "\n"; |
|
43 | + echo 'Error Description: ' . $helper->getErrorDescription() . "\n"; |
|
44 | 44 | } else { |
45 | 45 | header('HTTP/1.0 400 Bad Request'); |
46 | 46 | echo 'Bad request'; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | try { |
66 | 66 | $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken); |
67 | 67 | } catch (Facebook\Exceptions\FacebookSDKException $e) { |
68 | - echo '<p>Error getting long-lived access token: '.$helper->getMessage()."</p>\n\n"; |
|
68 | + echo '<p>Error getting long-lived access token: ' . $helper->getMessage() . "</p>\n\n"; |
|
69 | 69 | exit; |
70 | 70 | } |
71 | 71 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | } else { |
79 | 79 | $redirUrl = 'fb-signup.php'; |
80 | 80 | } |
81 | -header('Location: '.$redirUrl); |
|
81 | +header('Location: ' . $redirUrl); |
|
82 | 82 | |
83 | 83 | // User is logged in with a long-lived access token. |
84 | 84 | // You can redirect them to a members-only page. |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } catch (\Exception $e) { |
35 | 35 | } |
36 | 36 | |
37 | -$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; |
|
37 | +$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
|
38 | 38 | $url = substr($url, 0, -12); // remove "/install.php" from url |
39 | 39 | |
40 | 40 | if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | //exit; |
49 | 49 | $conn->exec($sql); |
50 | 50 | } catch (\Exception $e) { |
51 | - echo 'Error (code: '.$e->getCode().') adding tables to database: '.$e->getMessage(); |
|
51 | + echo 'Error (code: ' . $e->getCode() . ') adding tables to database: ' . $e->getMessage(); |
|
52 | 52 | exit; |
53 | 53 | } |
54 | 54 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $lastname = $_POST['lastname']; |
59 | 59 | $lastname = trim(strip_tags($lastname)); |
60 | 60 | |
61 | - $username = strtolower($firstname).'.'.strtolower($lastname); |
|
61 | + $username = strtolower($firstname) . '.' . strtolower($lastname); |
|
62 | 62 | |
63 | 63 | $password = $_POST['password']; |
64 | 64 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | try { |
83 | 83 | $user->save(); |
84 | 84 | } catch (\Exception $e) { |
85 | - echo 'Error (code: '.$e->getCode().') adding user to database: '.$e->getMessage(); |
|
85 | + echo 'Error (code: ' . $e->getCode() . ') adding user to database: ' . $e->getMessage(); |
|
86 | 86 | exit; |
87 | 87 | } |
88 | 88 | |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | |
180 | 180 | $settings->save(); |
181 | 181 | |
182 | - header('Location: login.php?username='.$username); // Move to the home page of the admin section |
|
182 | + header('Location: login.php?username=' . $username); // Move to the home page of the admin section |
|
183 | 183 | exit; |
184 | 184 | } |
185 | 185 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | The following error has occurred |
46 | 46 | <?php namespace TechWilk\Rota; |
47 | 47 | |
48 | -echo " on page '".$page."':<br><br>"; |
|
48 | +echo " on page '" . $page . "':<br><br>"; |
|
49 | 49 | echo '<strong>'; |
50 | 50 | |
51 | 51 | switch ($no) { |