From 0a780e83bf3632c9b7eca2fddaf8d2aaefca093c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 12 Jan 2007 08:42:36 +0000 Subject: [PATCH] * Pass e-mail and real name fields to AuthPlugin::addUser, as additional 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 | 3 +++ includes/AuthPlugin.php | 6 ++++-- includes/SpecialUserlogin.php | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 94b2760553..b473ba60a7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php index e33ef1bf94..c7d8448c1a 100644 --- a/includes/AuthPlugin.php +++ b/includes/AuthPlugin.php @@ -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; } diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index e60e3d54ed..47f7a2c644 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -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; } -- 2.20.1