From: Evan Prodromou Date: Fri, 25 Feb 2011 16:00:55 +0000 (-0800) Subject: allow passing an url to email confirmation function X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ecfb3b92880808e658cce967a3a33adecc2b955e;p=quix0rs-gnu-social.git allow passing an url to email confirmation function --- diff --git a/lib/mail.php b/lib/mail.php index 78361a3a38..ab22de404c 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -162,8 +162,12 @@ function mail_to_user(&$user, $subject, $body, $headers=array(), $address=null) * * @return success flag */ -function mail_confirm_address($user, $code, $nickname, $address) +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'); @@ -178,7 +182,8 @@ function mail_confirm_address($user, $code, $nickname, $address) "Thanks for your time, \n%2\$s\n"), $nickname, common_config('site', 'name'), - common_local_url('confirmaddress', array('code' => $code))); + $url); + $headers = array(); return mail_to_user($user, $subject, $body, $headers, $address);