Allow AuthPlugin to determine if user passwords should be stored
locally.
* Released as part of 1.20wmf10, 1.19.2, 1.18.5
Change-Id: Ie41bed7ecf5390f8815128c227bae371880a6058
return true;
}
+ /**
+ * Should MediaWiki store passwords in its local database?
+ *
+ * @return bool
+ */
+ public function allowSetLocalPassword() {
+ return true;
+ }
+
/**
* Set the given password in the authentication database.
* As a special case, the password may be set to null to request
* @todo Only rarely do all these fields need to be set!
*/
public function saveSettings() {
+ global $wgAuth;
+
$this->load();
if ( wfReadOnly() ) { return; }
if ( 0 == $this->mId ) { return; }
$this->mTouched = self::newTouchedTimestamp();
+ if ( !$wgAuth->allowSetLocalPassword() ) {
+ $this->mPassword = '';
+ }
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'user',