aboutsummaryrefslogtreecommitdiffstats
path: root/includes/mail/MailAddress.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/mail/MailAddress.php')
-rw-r--r--includes/mail/MailAddress.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/mail/MailAddress.php b/includes/mail/MailAddress.php
index bf64e02506e1..f6a2fca45dbb 100644
--- a/includes/mail/MailAddress.php
+++ b/includes/mail/MailAddress.php
@@ -24,6 +24,8 @@
* @author Luke Welling lwelling@wikimedia.org
*/
+use MediaWiki\Mail\UserEmailContact;
+
/**
* Stores a single person's name and email address.
* These are passed in via the constructor, and will be returned in SMTP
@@ -63,12 +65,12 @@ class MailAddress {
/**
* Create a new MailAddress object for the given user
*
- * @since 1.24
- * @param User $user
+ * @param UserEmailContact $user
* @return MailAddress
+ * @since 1.24
*/
- public static function newFromUser( User $user ) {
- return new MailAddress( $user->getEmail(), $user->getName(), $user->getRealName() );
+ public static function newFromUser( UserEmailContact $user ) {
+ return new MailAddress( $user->getEmail(), $user->getUser()->getName(), $user->getRealName() );
}
/**