From: Brion Vibber Date: Fri, 12 Jan 2007 08:42:36 +0000 (+0000) Subject: * Pass e-mail and real name fields to AuthPlugin::addUser, as additional X-Git-Tag: 1.31.0-rc.0~54468 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=0a780e83bf3632c9b7eca2fddaf8d2aaefca093c;p=lhc%2Fweb%2Fwiklou.git * 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! --- 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; }