+ $type = $oldaddr != '' ? 'changed' : 'set';
+ $notificationResult = null;
+
+ if ( $wgEmailAuthentication ) {
+ // Send the user an email notifying the user of the change in registered
+ // email address on their previous email address
+ if ( $type == 'changed' ) {
+ $change = $str != '' ? 'changed' : 'removed';
+ $notificationResult = $this->sendMail(
+ wfMessage( 'notificationemail_subject_' . $change )->text(),
+ wfMessage( 'notificationemail_body_' . $change,
+ $this->getRequest()->getIP(),
+ $this->getName(),
+ $str )->text()
+ );
+ }
+ }
+