]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
allow passing an url to email confirmation function
authorEvan Prodromou <evan@status.net>
Fri, 25 Feb 2011 16:00:55 +0000 (08:00 -0800)
committerEvan Prodromou <evan@status.net>
Fri, 25 Feb 2011 16:00:55 +0000 (08:00 -0800)
lib/mail.php

index 78361a3a3899a7b86ec90fda6e63a514b21826b5..ab22de404c421581f4043e1578a4c641912ddcbc 100644 (file)
@@ -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);