X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Finvite.php;h=04ae29a2e7ac49c1a640f04627d227b7d4614951;hb=c55e3089c555c0a9f12b997f25b7f4f397a0e2c6;hp=242ade7979a110d93904ec065e86bf1d867e38a8;hpb=b158658caa1ecf0ce725ffa9055da8579cfa4ffc;p=quix0rs-gnu-social.git diff --git a/actions/invite.php b/actions/invite.php index 242ade7979..04ae29a2e7 100644 --- a/actions/invite.php +++ b/actions/invite.php @@ -72,7 +72,7 @@ class InviteAction extends Action { } } else { $sent[] = $email; - $this->send_invitation($email, $user); + $this->send_invitation($email, $user, $personal); } } @@ -141,7 +141,12 @@ class InviteAction extends Action { common_show_footer(); } - function send_invitation($email, $user) { + function send_invitation($email, $user, $personal) { + + $profile = $user->getProfile(); + $bestname = $profile->getBestName(); + + $sitename = common_config('site', 'name'); $invite = new Invitation(); @@ -160,19 +165,22 @@ class InviteAction extends Action { $headers['From'] = mail_notify_from(); $headers['To'] = $email; - $headers['Subject'] = sprintf(_('%1s has invited you to join them on %2s'), $bestname, $sitename); - - $body = sprintf(_("%1$s has invited you to join them on %2$s (%3$s).\n\n". - "%2$s is a micro-blogging service that lets you keep up-to-date with people you know and people who interest you.\n\n". - "You can also share news about yourself, your thoughts, or your life online with people who know about you.\n\n". - "%1$s said:\n\n%4$s\n\n". - "You can see %1$s's profile page on %2$s here:\n\n". - "%5$s\n\n". + $headers['Subject'] = sprintf(_('%1$s has invited you to join them on %2$s'), $bestname, $sitename); + + $body = sprintf(_("%1\$s has invited you to join them on %2\$s (%3\$s).\n\n". + "%2\$s is a micro-blogging service that lets you keep up-to-date with people you know and people who interest you.\n\n". + "You can also share news about yourself, your thoughts, or your life online with people who know about you. ". + "It's also great for meeting new people who share your interests.\n\n". + "%1\$s said:\n\n%4\$s\n\n". + "You can see %1\$s's profile page on %2\$s here:\n\n". + "%5\$s\n\n". "If you'd like to try the service, click on the link below to accept the invitation.\n\n". - "%6$s\n\n". + "%6\$s\n\n". "If not, you can ignore this message. Thanks for your patience and your time.\n\n". - "Sincerely, %2$s\n"), - $bestname, $sitename, common_root_url(), + "Sincerely, %2\$s\n"), + $bestname, + $sitename, + common_root_url(), $personal, common_local_url('showstream', array('nickname' => $user->nickname)), common_local_url('register', array('code' => $invite->code)));