]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/mail.php
Merge branch 'nightly' into 'nightly'
[quix0rs-gnu-social.git] / lib / mail.php
index 42a756ac5dc79b5f11ac0084dee1b05950df0e33..497637eb444b9379125406f212213f2193728a4e 100644 (file)
@@ -144,7 +144,7 @@ function mail_notify_from()
  *
  * @return boolean success flag
  */
-function mail_to_user(&$user, $subject, $body, $headers=array(), $address=null)
+function mail_to_user($user, $subject, $body, $headers=array(), $address=null)
 {
     if (!$address) {
         $address = $user->email;
@@ -161,45 +161,6 @@ function mail_to_user(&$user, $subject, $body, $headers=array(), $address=null)
     return mail_send($recipients, $headers, $body);
 }
 
-/**
- * Send an email to confirm a user's control of an email address
- *
- * @param User   $user     User claiming the email address
- * @param string $code     Confirmation code
- * @param string $nickname Nickname of user
- * @param string $address  email address to confirm
- *
- * @see common_confirmation_code()
- *
- * @return success flag
- */
-function mail_confirm_address($user, $code, $nickname, $address, $url=null)
-{
-    if (empty($url)) {
-        $url = common_local_url('confirmaddress', array('code' => $code));
-    }
-
-    // TRANS: Subject for address confirmation email.
-    $subject = _('Email address confirmation');
-
-    // TRANS: Body for address confirmation email.
-    // TRANS: %1$s is the addressed user's nickname, %2$s is the StatusNet sitename,
-    // TRANS: %3$s is the URL to confirm at.
-    $body = sprintf(_("Hey, %1\$s.\n\n".
-                      "Someone just entered this email address on %2\$s.\n\n" .
-                      "If it was you, and you want to confirm your entry, ".
-                      "use the URL below:\n\n\t%3\$s\n\n" .
-                      "If not, just ignore this message.\n\n".
-                      "Thanks for your time, \n%2\$s\n"),
-                    $nickname,
-                    common_config('site', 'name'),
-                    $url);
-
-    $headers = array();
-
-    return mail_to_user($user, $subject, $body, $headers, $address);
-}
-
 /**
  * notify a user of subscription by another user
  *
@@ -238,8 +199,7 @@ function mail_subscribe_notify_profile($listenee, $other)
 
         $name = $profile->getBestName();
 
-        $long_name = ($other->fullname) ?
-          ($other->fullname . ' (' . $other->nickname . ')') : $other->nickname;
+        $long_name = $other->getFancyName();
 
         $recipients = $listenee->email;