We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit ecfb3b92 authored by Evan Prodromou's avatar Evan Prodromou

allow passing an url to email confirmation function

parent f743a233
......@@ -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"),
common_config('site', 'name'),
common_local_url('confirmaddress', array('code' => $code)));
$headers = array();
return mail_to_user($user, $subject, $body, $headers, $address);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment