Browse Source

php - send emails on multi-payaddress changes

master
kanoi 9 years ago
parent
commit
9cf6e7c294
  1. 20
      pool/page_addrmgt.php

20
pool/page_addrmgt.php

@ -1,5 +1,7 @@
<?php <?php
# #
include_once('email.php');
#
function addrmgtuser($data, $user, $err) function addrmgtuser($data, $user, $err)
{ {
$pg = '<h1>Address Management</h1>'; $pg = '<h1>Address Management</h1>';
@ -141,6 +143,7 @@ function addrmgtuser($data, $user, $err)
function doaddrmgt($data, $user) function doaddrmgt($data, $user)
{ {
$err = ''; $err = '';
$ans = null;
$OK = getparam('OK', false); $OK = getparam('OK', false);
$count = getparam('rows', false); $count = getparam('rows', false);
$pass = getparam('pass', false); $pass = getparam('pass', false);
@ -163,6 +166,23 @@ function doaddrmgt($data, $user)
$ans = userSettings($user, null, $addrarr, $pass, $twofa); $ans = userSettings($user, null, $addrarr, $pass, $twofa);
if ($ans['STATUS'] != 'ok') if ($ans['STATUS'] != 'ok')
$err = $ans['ERROR']; $err = $ans['ERROR'];
else
{
if (isset($ans['email']))
$email = $ans['email'];
else
$email = '';
$emailinfo = getOpts($user, emailOptList());
if ($emailinfo['STATUS'] != 'ok')
{
if ($err != '')
$err .= '<br>';
$err .= 'An error occurred, check your details below';
}
else
payoutAddressChanged($email, zeip(), $emailinfo);
}
} }
} }

Loading…
Cancel
Save