Commit 944e2cb3 authored by Timo Tijhof's avatar Timo Tijhof
Browse files

Avoid calling saveToCache() directly

loadFromId() will loadFromDatabase() and put into cache.
The plugin shouldn't worry about this.

Required for Ia7ab78ef in MediaWiki core.

Change-Id: Ib6394af82b12675e6e4df3d2941d5f876e415a3a
parent 5b0cc60d
......@@ -56,8 +56,7 @@ abstract class PluggableAuth {
$session_variable = wfWikiID() . "_userid";
if ( array_key_exists( $session_variable, $_SESSION ) ) {
$user->mId = $_SESSION[$session_variable];
if ( $user->loadFromDatabase() ) {
$user->saveToCache();
if ( $user->loadFromId() ) {
self::logout( $user );
} else{
session_unset();
......@@ -89,8 +88,7 @@ abstract class PluggableAuth {
$session_variable = wfWikiID() . "_userid";
if ( array_key_exists( $session_variable, $_SESSION ) ) {
$user->mId = $_SESSION[$session_variable];
if ( $user->loadFromDatabase() ) {
$user->saveToCache();
if ( $user->loadFromId() ) {
$result = true;
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment