diff options
-rw-r--r-- | actions/finishremotesubscribe.php | 4 | ||||
-rw-r--r-- | lib/mail.php | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/actions/finishremotesubscribe.php b/actions/finishremotesubscribe.php index ba5156a20..c9bdf26da 100644 --- a/actions/finishremotesubscribe.php +++ b/actions/finishremotesubscribe.php @@ -181,6 +181,10 @@ class FinishremotesubscribeAction extends Action { return; } + # Notify user, if necessary + + mail_subscribe_notify_profile($user, $profile); + # Clear the data unset($_SESSION['oauth_authorization_request']); diff --git a/lib/mail.php b/lib/mail.php index e6c7ee0e2..3dc1f61e2 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -109,9 +109,13 @@ function mail_confirm_address($code, $nickname, $address) { } function mail_subscribe_notify($listenee, $listener) { + $other = $listener->getProfile(); + mail_subscribe_notify_profile($listenee, $other); +} + +function mail_subscribe_notify_profile($listenee, $other) { if ($listenee->email && $listenee->emailnotifysub) { $profile = $listenee->getProfile(); - $other = $listener->getProfile(); $name = $profile->getBestName(); $long_name = ($other->fullname) ? ($other->fullname . ' (' . $other->nickname . ')') : $other->nickname; $recipients = $listenee->email; |