summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/emailsettings.php4
-rw-r--r--classes/User.php4
-rw-r--r--lib/mail.php4
3 files changed, 4 insertions, 8 deletions
diff --git a/actions/emailsettings.php b/actions/emailsettings.php
index 61e59e4db..b35b4d28e 100644
--- a/actions/emailsettings.php
+++ b/actions/emailsettings.php
@@ -229,9 +229,7 @@ class EmailsettingsAction extends SettingsAction {
return;
}
- mail_confirm_address($confirm->code,
- $user->nickname,
- $email);
+ mail_confirm_address($user, $confirm->code, $user->nickname, $email);
$msg = _('A confirmation code was sent to the email address you added. Check your inbox (and spam box!) for the code and instructions on how to use it.');
diff --git a/classes/User.php b/classes/User.php
index 7ac975007..11b010a83 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -263,9 +263,7 @@ class User extends Memcached_DataObject
$profile->query('COMMIT');
if ($email && !$user->email) {
- mail_confirm_address($confirm->code,
- $profile->nickname,
- $email);
+ mail_confirm_address($user, $confirm->code, $profile->nickname, $email);
}
return $user;
diff --git a/lib/mail.php b/lib/mail.php
index e627730a7..313040ca2 100644
--- a/lib/mail.php
+++ b/lib/mail.php
@@ -85,8 +85,8 @@ function mail_to_user(&$user, $subject, $body, $address=NULL) {
# For confirming a Jabber address
-function mail_confirm_address($code, $nickname, $address) {
- $user = common_current_user();
+function mail_confirm_address($user, $code, $nickname, $address) {
+
$subject = _('Email address confirmation');
$body = sprintf(_("Hey, %s.\n\nSomeone just entered this email address on %s.\n\n" .