* Pass e-mail and real name fields to AuthPlugin::addUser, as additional
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 12 Jan 2007 08:42:36 +0000 (08:42 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 12 Jan 2007 08:42:36 +0000 (08:42 +0000)
  optional fields, which may be considered useful at registration time.

This fixes the problem where the e-mail address given for a new account
got replaced with null. Woops!

RELEASE-NOTES
includes/AuthPlugin.php
includes/SpecialUserlogin.php

index 94b2760..b473ba6 100644 (file)
@@ -53,6 +53,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 3446) Add user preference to hide page content below diffs, can be overridden by adding
              diffonly=1 or diffonly=0 to the URL of the diff page
 * (bug 8002) Math should render left-to-right even in right-to-left wikis
+* Pass e-mail and real name fields to AuthPlugin::addUser, as additional
+  optional fields, which may be considered useful at registration time.
+
 
 == Languages updated ==
 
index e33ef1b..c7d8448 100644 (file)
@@ -187,12 +187,14 @@ class AuthPlugin {
         * Add a user to the external authentication database.
         * Return true if successful.
         *
-        * @param User $user
+        * @param User $user - only the name should be assumed valid at this point
         * @param string $password
+        * @param string $email
+        * @param string $realname
         * @return bool
         * @public
         */
-       function addUser( $user, $password ) {
+       function addUser( $user, $password, $email='', $realname='' ) {
                return true;
        }
 
index e60e3d5..47f7a2c 100644 (file)
@@ -286,7 +286,7 @@ class LoginForm {
                        }
                }
 
-               if( !$wgAuth->addUser( $u, $this->mPassword ) ) {
+               if( !$wgAuth->addUser( $u, $this->mPassword, $this->mEmail, $this->mRealName ) ) {
                        $this->mainLoginForm( wfMsg( 'externaldberror' ) );
                        return false;
                }