Browse code

fix codingstyle

Hanno authored on 10/04/2019 08:52:30
Showing 2 changed files
... ...
@@ -189,7 +189,8 @@ function logger($severity, $scriptname, $scope, $message)
189 189
     db_query("INSERT INTO misc.scriptlog (remote, user,scriptname,scope,message) VALUES (:remote, :user, :scriptname, :scope, :message)", $args);
190 190
 }
191 191
 
192
-function count_failed_logins() {
192
+function count_failed_logins()
193
+{
193 194
     $result = db_query("SELECT count(*) AS num FROM misc.scriptlog WHERE user IS NULL AND scriptname='session/start' AND scope='login' AND message LIKE 'wrong user data%' AND remote=:remote AND `timestamp` > NOW() - INTERVAL 10 MINUTE", array(":remote" => $_SERVER['REMOTE_ADDR']));
194 195
     $data = $result->fetch();
195 196
     DEBUG('seen '.$data['num'].' failed logins from this address within 10 minutes');
... ...
@@ -62,7 +62,7 @@ if (have_role(ROLE_CUSTOMER) && count($useraccounts) > 1) {
62 62
     output('<h4>Zuständiges Benutzerkonto</h4>');
63 63
     $form = '<p>Diese Domain nutzen im Benutzerkonto '.html_select('domainuser', $options, $dom->useraccount).' <input type="submit" name="submit" value="Änderung speichern"></p>';
64 64
     output(html_form('update-user', 'update', 'action=chguser&id='.$dom->id, $form));
65
-} else if (!have_role(ROLE_SYSTEMUSER) || $dom->useraccount != $_SESSION['userinfo']['uid']) {
65
+} elseif (!have_role(ROLE_SYSTEMUSER) || $dom->useraccount != $_SESSION['userinfo']['uid']) {
66 66
     // Kunde hat keine mehreren User, Domain ist trotzdem in einem anderen Useraccount
67 67
     $is_current_user = false;
68 68
     output('<h4>Zuständiges Benutzerkonto</h4>');