Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Vojtech Myslivec
ISPConfig 3
Commits
d0dd6702
Commit
d0dd6702
authored
May 29, 2019
by
Florian Schaal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-add missing code for last commit
parent
118ed211
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
interface/web/login/index.php
interface/web/login/index.php
+10
-0
No files found.
interface/web/login/index.php
View file @
d0dd6702
...
...
@@ -268,6 +268,16 @@ if(count($_POST) > 0) {
fwrite
(
$authlog_handle
,
$authlog
.
"
\n
"
);
fclose
(
$authlog_handle
);
$app
->
db
->
query
(
"INSERT INTO sys_login (`session_id`, `username`, `ip`, `login-time`) VALUES (?, ?, ?, CURRENT_TIMESTAMP) ON DUPLICATE KEY UPDATE `login-time`=CURRENT_TIMESTAMP"
,
session_id
(),
$username
,
$_SERVER
[
'REMOTE_ADDR'
]);
// get last IP used to login
$user_data
=
$app
->
db
->
queryOneRecord
(
"SELECT last_login_ip,last_login_at FROM sys_user WHERE username = ?"
,
$username
);
$_SESSION
[
's'
][
'last_login_ip'
]
=
$user_data
[
'last_login_ip'
];
$_SESSION
[
's'
][
'last_login_at'
]
=
$user_data
[
'last_login_at'
];
if
(
!
$loginAs
)
{
$app
->
db
->
query
(
"UPDATE sys_user SET last_login_ip = ?, last_login_at = ? WHERE username = ?"
,
$_SERVER
[
'REMOTE_ADDR'
],
time
(),
$username
);
}
/*
* We need LOGIN_REDIRECT instead of HEADER_REDIRECT to load the
* new theme, if the logged-in user has another
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment