From: Kunal Mehta Date: Mon, 4 Aug 2014 01:41:39 +0000 (-0700) Subject: Add getPassword/getTemporaryPassword accessors to User X-Git-Tag: 1.31.0-rc.0~14602 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=50bcbe6c89e4421768fa16d14ffe9b2aadac1027;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/User.php b/includes/User.php index a21119a4f8..7edd93ec78 100644 --- a/includes/User.php +++ b/includes/User.php @@ -181,8 +181,16 @@ class User implements IDBAccessObject { public $mRealName; + /** + * @todo Make this actually private + * @private + */ public $mPassword; + /** + * @todo Make this actually private + * @private + */ public $mNewpassword; public $mNewpassTime; @@ -2247,6 +2255,26 @@ class User implements IDBAccessObject { return $this->mTouched; } + /** + * @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;