X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FUser.php;h=635b1e925816eaf9a4ff60ec06347b91efa3b066;hb=01a7b4343a2a125b9899837043d506d7bb6cb1ed;hp=665edb973c9c41d985bc05c6f1413a154dbc2029;hpb=2c199cb8b7cd927dafd7a84c7c2f555deb51716e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/User.php b/includes/User.php index 665edb973c..635b1e9258 100644 --- a/includes/User.php +++ b/includes/User.php @@ -829,7 +829,7 @@ class User implements IDBAccessObject { * @param int $ts Optional timestamp to convert, default 0 for the current time */ public function expirePassword( $ts = 0 ) { - $this->load(); + $this->loadPasswords(); $timestamp = wfTimestamp( TS_MW, $ts ); $this->mPasswordExpires = $timestamp; $this->saveSettings(); @@ -1885,7 +1885,6 @@ class User implements IDBAccessObject { return $this->mLocked; } global $wgAuth; - StubObject::unstub( $wgAuth ); $authUser = $wgAuth->getUserInstance( $this ); $this->mLocked = (bool)$authUser->isLocked(); return $this->mLocked; @@ -1903,7 +1902,6 @@ class User implements IDBAccessObject { $this->getBlockedStatus(); if ( !$this->mHideName ) { global $wgAuth; - StubObject::unstub( $wgAuth ); $authUser = $wgAuth->getUserInstance( $this ); $this->mHideName = (bool)$authUser->isHidden(); } @@ -3788,12 +3786,14 @@ class User implements IDBAccessObject { */ public function checkPassword( $password ) { global $wgAuth, $wgLegacyEncoding; + + $section = new ProfileSection( __METHOD__ ); + $this->loadPasswords(); // Certain authentication plugins do NOT want to save // domain passwords in a mysql database, so we should // check this (in case $wgAuth->strict() is false). - if ( $wgAuth->authenticate( $this->getName(), $password ) ) { return true; } elseif ( $wgAuth->strict() ) { @@ -3992,10 +3992,10 @@ class User implements IDBAccessObject { $sender = new MailAddress( $wgPasswordSender, wfMessage( 'emailsender' )->inContentLanguage()->text() ); } else { - $sender = new MailAddress( $from ); + $sender = MailAddress::newFromUser( $from ); } - $to = new MailAddress( $this ); + $to = MailAddress::newFromUser( $this ); return UserMailer::send( $to, $sender, $subject, $body, $replyto ); }