jenkins-bot has submitted this change and it was merged.

Change subject: Add getPassword/getTemporaryPassword accessors to User
......................................................................


Add getPassword/getTemporaryPassword accessors to User

In I0a9c972931a, User::load() no longer loaded the
mPassword and mNewpassword member variables, and
User::loadPasswords() is private. So this lets
things that need to access the Password objects directly.

Change-Id: Ib79ce01a47f90af681e376ce918eda559b4b94a6
---
M includes/User.php
1 file changed, 28 insertions(+), 0 deletions(-)

Approvals:
  Parent5446: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/User.php b/includes/User.php
index a21119a..7edd93e 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -181,8 +181,16 @@
 
        public $mRealName;
 
+       /**
+        * @todo Make this actually private
+        * @private
+        */
        public $mPassword;
 
+       /**
+        * @todo Make this actually private
+        * @private
+        */
        public $mNewpassword;
 
        public $mNewpassTime;
@@ -2248,6 +2256,26 @@
        }
 
        /**
+        * @return Password
+        * @since 1.24
+        */
+       public function getPassword() {
+               $this->loadPasswords();
+
+               return $this->mPassword;
+       }
+
+       /**
+        * @return Password
+        * @since 1.24
+        */
+       public function getTemporaryPassword() {
+               $this->loadPasswords();
+
+               return $this->mNewpassword;
+       }
+
+       /**
         * Set the password and reset the random token.
         * Calls through to authentication plugin if necessary;
         * will have no effect if the auth plugin refuses to

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib79ce01a47f90af681e376ce918eda559b4b94a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to