Skip to content

Commit fc3ef84

Browse files
committed
Move login event, for 2fa it is done in otp.php
1 parent 98fdac3 commit fc3ef84

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

interface/web/login/index.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,6 @@ function process_login_request(app $app, &$error, $conf, $module)
126126
}
127127
}
128128

129-
$app->plugin->raiseEvent('login', $username);
130-
131-
//* Save successful login message to var
132-
$authlog = 'Successful login for user \''.$username.'\' from '.$_SERVER['REMOTE_ADDR'].' at '.date('Y-m-d H:i:s').' with session ID '.session_id();
133-
$authlog_handle = fopen($conf['ispconfig_log_dir'].'/auth.log', 'a');
134-
fwrite($authlog_handle, $authlog."\n");
135-
fclose($authlog_handle);
136129

137130
/*
138131
* We need LOGIN_REDIRECT instead of HEADER_REDIRECT to load the
@@ -161,6 +154,8 @@ function process_login_request(app $app, &$error, $conf, $module)
161154
header('Location: otp.php');
162155
die();
163156
} else {
157+
$app->plugin->raiseEvent('login', $username);
158+
$app->auth_log('Successful login for user \''. $username .'\' ' . $msg . ' from '. $_SERVER['REMOTE_ADDR'] .' at '. date('Y-m-d H:i:s') . ' with session ID ' .session_id());
164159
header('Location: ../index.php');
165160
die();
166161
}

0 commit comments

Comments
 (0)