You are here Home > Know-how > MediaWiki - CMS > Include Files (PHP) > includes/SpecialPreferences.php
MediaWiki - CMS
 

8.4.5 includes/SpecialPreferences.php

15.06.2007
8.4.4 includes/SpecialFoo.php [  up  ] - [ A - Z ] - [ top ] 8.4.6 includes/SpecialUpload.php

8.1   Own MediaWiki Extension
8.2   Caching
8.2.1   eAccelerator
8.3   Upload Large Files
8.4   Include Files (PHP)
8.4.1   includes/DefaultSettings.php
8.4.2   includes/EditPage.php
8.4.3   includes/MimeMagic.php
8.4.4   includes/SpecialFoo.php
8.4.5   includes/SpecialPreferences.php
8.4.6   includes/SpecialUpload.php
8.4.7   includes/UserMailer.php
8.5   Interfaces / API's
8.5.1   Perl Interface
8.5.1.1   WWW::Mediawiki::Client
8.5.1.2   CMS::MediaWiki (Perl Module)
8.5.2   XML Stuff
8.5.3   PHP related
8.6   KnowledgeTree (DMS)
8.7   Security
8.8   Single Sign On
8.9   MySQL Database

Tip

You might want to provision another account on antoher system in an automated fashion when a MediaWiki user changes / updates his/her password. To add a tweak code, open SpecialPreferences.php:

(function savePreferences)

if ( '' != $this->mNewpass ) {
        if ( $this->mNewpass != $this->mRetypePass ) {
                $this->mainPrefsForm( 'error', wfMsg( 'badretype' ) );
                return;
        }
                if ( strlen( $this->mNewpass ) < $wgMinimalPasswordLength ) {
                $this->mainPrefsForm( 'error',
			wfMsg( 'passwordtooshort', $wgMinimalPasswordLength ) );
                return;
        }
                if (!$wgUser->checkPassword( $this->mOldpass )) {
                $this->mainPrefsForm( 'error', wfMsg( 'wrongpassword' ) );
                return;
        }
        if (!$wgAuth->setPassword( $wgUser, $this->mNewpass )) {
                $this->mainPrefsForm( 'error', wfMsg( 'externaldberror' ) );
                return;
        }
        # X
        $FH = fopen("/writeable4www/prefix_" . $wgUser->{'mName'} . "_curpw.txt", "w");
        fwrite($FH, $this->mNewpass . "\n");
        fclose($FH);
        # /X
        
        $wgUser->setPassword( $this->mNewpass );
}



See also:
Sso


8.4.4 includes/SpecialFoo.php       A - Z Index       Top       Disclaimer       8.4.6 includes/SpecialUpload.php


$Id: includes-SpecialPreferences.html,v 1.75 2007/06/15 11:49:14 webcms Exp $
copyright © 2005-2007 by reto