Umherirrender has submitted this change and it was merged.

Change subject: Avoid calling saveToCache() directly
......................................................................


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
---
M PluggableAuth.class.php
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  Umherirrender: Verified; Looks good to me, approved



diff --git a/PluggableAuth.class.php b/PluggableAuth.class.php
index 1d1de9d..efbbdc5 100644
--- a/PluggableAuth.class.php
+++ b/PluggableAuth.class.php
@@ -56,8 +56,7 @@
                                $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 @@
                $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;
                        }

-- 
To view, visit https://gerrit.wikimedia.org/r/273598
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6394af82b12675e6e4df3d2941d5f876e415a3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PluggableAuth
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to