Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Hermann Schwärzler
PluggableAuth
Commits
dbfe9cf8
Commit
dbfe9cf8
authored
Mar 27, 2015
by
cicalese
Browse files
make sure deauthenticate function is called if session times out
Change-Id: Ibf4c6d8d08dbea4f4d29d3fdaea534be48225358
parent
e98e2feb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
PluggableAuth.class.php
PluggableAuth.class.php
+14
-2
PluggableAuth.php
PluggableAuth.php
+1
-1
No files found.
PluggableAuth.class.php
View file @
dbfe9cf8
...
...
@@ -53,8 +53,20 @@ abstract class PluggableAuth {
if
(
isset
(
$_SESSION
[
'LAST_ACTIVITY'
]
)
&&
(
$time
-
$_SESSION
[
'LAST_ACTIVITY'
]
>
$GLOBALS
[
'PluggableAuth_Timeout'
]
)
)
{
session_unset
();
session_destroy
();
$session_variable
=
wfWikiID
()
.
"_userid"
;
if
(
array_key_exists
(
$session_variable
,
$_SESSION
)
)
{
$user
->
mId
=
$_SESSION
[
$session_variable
];
if
(
$user
->
loadFromDatabase
()
)
{
$user
->
saveToCache
();
self
::
logout
(
$user
);
}
else
{
session_unset
();
session_destroy
();
}
}
else
{
session_unset
();
session_destroy
();
}
wfDebug
(
"Session timed out."
);
}
$_SESSION
[
'LAST_ACTIVITY'
]
=
$time
;
...
...
PluggableAuth.php
View file @
dbfe9cf8
...
...
@@ -29,7 +29,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
$GLOBALS
[
'wgExtensionCredits'
][
'other'
][]
=
array
(
'path'
=>
__FILE__
,
'name'
=>
'PluggableAuth'
,
'version'
=>
'1.
0
'
,
'version'
=>
'1.
1
'
,
'author'
=>
array
(
'[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy Cicalese]'
),
...
...
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