Changing "private" to "protected" on a few functions in User.php
authorPeter Gehres <pgehres@wikimedia.org>
Thu, 16 May 2013 22:18:57 +0000 (15:18 -0700)
committerPgehres <pgehres@wikimedia.org>
Thu, 16 May 2013 22:19:59 +0000 (22:19 +0000)
This is required for auth plugins to be able to send customized
email confirmation and migration emails.  For example, we need to
send emails from CentralAuth that will both confirm the email
address and then run through Special:MergeAccount attempting to
attach as many local accounts as possible.

Change-Id: If281aa6219e5a0b80252b0deac7ee0c4f74c3d58

includes/User.php

index 1d87d40..e2cbb81 100644 (file)
@@ -912,7 +912,7 @@ class User {
         *
         * @param $item String
         */
-       private function setItemLoaded( $item ) {
+       protected function setItemLoaded( $item ) {
                if ( is_array( $this->mLoadedItems ) ) {
                        $this->mLoadedItems[$item] = true;
                }
@@ -3668,7 +3668,7 @@ class User {
         * @param &$expiration \mixed Accepts the expiration time
         * @return String New token
         */
-       private function confirmationToken( &$expiration ) {
+       protected function confirmationToken( &$expiration ) {
                global $wgUserEmailConfirmationTokenExpiry;
                $now = time();
                $expires = $now + $wgUserEmailConfirmationTokenExpiry;
@@ -3686,7 +3686,7 @@ class User {
         * @param string $token Accepts the email confirmation token
         * @return String New token URL
         */
-       private function confirmationTokenUrl( $token ) {
+       protected function confirmationTokenUrl( $token ) {
                return $this->getTokenUrl( 'ConfirmEmail', $token );
        }
 
@@ -3695,7 +3695,7 @@ class User {
         * @param string $token Accepts the email confirmation token
         * @return String New token URL
         */
-       private function invalidationTokenUrl( $token ) {
+       protected function invalidationTokenUrl( $token ) {
                return $this->getTokenUrl( 'InvalidateEmail', $token );
        }