@@ -36,8 +36,7 @@ discard block |
||
36 | 36 | SessionAlert::error($ex->getMessage()); |
37 | 37 | $this->redirect('register'); |
38 | 38 | } |
39 | - } |
|
40 | - else { |
|
39 | + } else { |
|
41 | 40 | $this->assignCSRFToken(); |
42 | 41 | $this->assign("useOAuthSignup", $useOAuthSignup); |
43 | 42 | $this->setTemplate($this->getRegistrationTemplate()); |
@@ -198,8 +197,7 @@ discard block |
||
198 | 197 | WebRequest::setPartialLogin($user); |
199 | 198 | |
200 | 199 | $this->redirectUrl($oauthHelper->getAuthoriseUrl($requestToken->key)); |
201 | - } |
|
202 | - else { |
|
200 | + } else { |
|
203 | 201 | // only notify if we're not using the oauth signup. |
204 | 202 | $this->getNotificationHelper()->userNew($user); |
205 | 203 | WebRequest::setLoggedInUser($user); |
@@ -40,8 +40,7 @@ |
||
40 | 40 | $this->getNotificationHelper()->siteNoticeEdited(); |
41 | 41 | |
42 | 42 | $this->redirect(); |
43 | - } |
|
44 | - else { |
|
43 | + } else { |
|
45 | 44 | $this->assignCSRFToken(); |
46 | 45 | |
47 | 46 | $this->setTemplate('site-notice/edit-form.tpl'); |
@@ -41,8 +41,7 @@ discard block |
||
41 | 41 | SessionAlert::success('<strong>Your password reset request has been completed.</strong> Please check your e-mail.'); |
42 | 42 | |
43 | 43 | $this->redirect('login'); |
44 | - } |
|
45 | - else { |
|
44 | + } else { |
|
46 | 45 | $this->assignCSRFToken(); |
47 | 46 | $this->setTemplate('forgot-password/forgotpw.tpl'); |
48 | 47 | } |
@@ -106,8 +105,7 @@ discard block |
||
106 | 105 | |
107 | 106 | return; |
108 | 107 | } |
109 | - } |
|
110 | - else { |
|
108 | + } else { |
|
111 | 109 | $this->assignCSRFToken(); |
112 | 110 | $this->assign('user', $user); |
113 | 111 | $this->setTemplate('forgot-password/forgotpwreset.tpl'); |
@@ -135,8 +135,7 @@ discard block |
||
135 | 135 | SessionAlert::success("Template successfully created."); |
136 | 136 | |
137 | 137 | $this->redirect('welcomeTemplates'); |
138 | - } |
|
139 | - else { |
|
138 | + } else { |
|
140 | 139 | $this->assignCSRFToken(); |
141 | 140 | $this->setTemplate("welcome-template/add.tpl"); |
142 | 141 | } |
@@ -182,8 +181,7 @@ discard block |
||
182 | 181 | $this->getNotificationHelper()->welcomeTemplateEdited($template); |
183 | 182 | |
184 | 183 | $this->redirect('welcomeTemplates'); |
185 | - } |
|
186 | - else { |
|
184 | + } else { |
|
187 | 185 | $this->assignCSRFToken(); |
188 | 186 | $this->assign('template', $template); |
189 | 187 | $this->setTemplate('welcome-template/edit.tpl'); |
@@ -128,8 +128,7 @@ |
||
128 | 128 | |
129 | 129 | if ($logCount === 0) { |
130 | 130 | $this->assign('accountlog', array()); |
131 | - } |
|
132 | - else { |
|
131 | + } else { |
|
133 | 132 | list($users, $logData) = LogHelper::prepareLogsForTemplate($logs, $database, $this->getSiteConfiguration()); |
134 | 133 | |
135 | 134 | $this->assign("accountlog", $logData); |
@@ -54,12 +54,10 @@ |
||
54 | 54 | // actually save the request to the database |
55 | 55 | if ($this->getSiteConfiguration()->getEmailConfirmationEnabled()) { |
56 | 56 | $this->saveAsEmailConfirmation($request); |
57 | - } |
|
58 | - else { |
|
57 | + } else { |
|
59 | 58 | $this->saveWithoutEmailConfirmation($request); |
60 | 59 | } |
61 | - } |
|
62 | - else { |
|
60 | + } else { |
|
63 | 61 | // set the form values from the session context |
64 | 62 | $context = WebRequest::getSessionContext('accountReq'); |
65 | 63 | if ($context !== null && is_array($context)) { |
@@ -48,8 +48,7 @@ |
||
48 | 48 | |
49 | 49 | if ($request->getEmailConfirm() === $si) { |
50 | 50 | $request->setEmailConfirm('Confirmed'); |
51 | - } |
|
52 | - else { |
|
51 | + } else { |
|
53 | 52 | throw new ApplicationLogicException('The confirmation value does not appear to match the expected value'); |
54 | 53 | } |
55 | 54 |
@@ -32,8 +32,7 @@ discard block |
||
32 | 32 | if (!headers_sent()) { |
33 | 33 | header("Strict-Transport-Security: max-age=15768000"); |
34 | 34 | } |
35 | - } |
|
36 | - else { |
|
35 | + } else { |
|
37 | 36 | // This is the login form, not the request form. We need protection here. |
38 | 37 | $this->redirectUrl('https://' . WebRequest::serverName() . WebRequest::requestUri()); |
39 | 38 | |
@@ -94,8 +93,7 @@ discard block |
||
94 | 93 | WebRequest::setLoggedInUser($user); |
95 | 94 | |
96 | 95 | $this->goBackWhenceYouCame($user); |
97 | - } |
|
98 | - else { |
|
96 | + } else { |
|
99 | 97 | // GET. Show the form |
100 | 98 | $this->assignCSRFToken(); |
101 | 99 | $this->setTemplate("login.tpl"); |
@@ -141,13 +139,11 @@ discard block |
||
141 | 139 | $redirectDestination = WebRequest::clearPostLoginRedirect(); |
142 | 140 | if ($redirectDestination !== null) { |
143 | 141 | $this->redirectUrl($redirectDestination); |
144 | - } |
|
145 | - else { |
|
142 | + } else { |
|
146 | 143 | if ($user->isNewUser()) { |
147 | 144 | // home page isn't allowed, go to preferences instead |
148 | 145 | $this->redirect('preferences'); |
149 | - } |
|
150 | - else { |
|
146 | + } else { |
|
151 | 147 | // go to the home page |
152 | 148 | $this->redirect(''); |
153 | 149 | } |
@@ -39,8 +39,7 @@ discard block |
||
39 | 39 | if ($config->getEmailConfirmationEnabled()) { |
40 | 40 | $query = "SELECT * FROM request WHERE status = :type AND emailconfirm = 'Confirmed';"; |
41 | 41 | $totalQuery = "SELECT COUNT(id) FROM request WHERE status = :type AND emailconfirm = 'Confirmed';"; |
42 | - } |
|
43 | - else { |
|
42 | + } else { |
|
44 | 43 | $query = "SELECT * FROM request WHERE status = :type;"; |
45 | 44 | $totalQuery = "SELECT COUNT(id) FROM request WHERE status = :type;"; |
46 | 45 | } |
@@ -73,7 +72,8 @@ discard block |
||
73 | 72 | $this->assign('totalRequests', $totalRequests); |
74 | 73 | |
75 | 74 | $userIds = array_map( |
76 | - function(Request $entry) { |
|
75 | + function(Request $entry) |
|
76 | + { |
|
77 | 77 | return $entry->getReserved(); |
78 | 78 | }, |
79 | 79 | $requests |