|
|
@ -127,8 +127,9 @@ function dosettings($data, $user) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case 'EMail': |
|
|
|
case 'EMail': |
|
|
|
$email = getparam('email', false); |
|
|
|
$email = getparam('email', false); |
|
|
|
if (stripos($email, 'hotmail') !== false) |
|
|
|
$res = bademail($email); |
|
|
|
$err = 'hotmail not allowed'; |
|
|
|
if ($res != null) |
|
|
|
|
|
|
|
$err = $res; |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
$pass = getparam('pass', false); |
|
|
|
$pass = getparam('pass', false); |
|
|
@ -141,29 +142,41 @@ function dosettings($data, $user) |
|
|
|
case 'Address': |
|
|
|
case 'Address': |
|
|
|
if (!isset($data['info']['u_multiaddr'])) |
|
|
|
if (!isset($data['info']['u_multiaddr'])) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$addr = getparam('baddr', false); |
|
|
|
$res = emailcheck($user); |
|
|
|
$addrarr = array(array('addr' => $addr)); |
|
|
|
if ($res != null) |
|
|
|
$pass = getparam('pass', false); |
|
|
|
$err = $res; |
|
|
|
$twofa = getparam('2fa', false); |
|
|
|
else |
|
|
|
$ans = userSettings($user, null, $addrarr, $pass, $twofa); |
|
|
|
{ |
|
|
|
$err = 'Payout address changed'; |
|
|
|
$addr = getparam('baddr', false); |
|
|
|
$check = true; |
|
|
|
$addrarr = array(array('addr' => $addr)); |
|
|
|
|
|
|
|
$pass = getparam('pass', false); |
|
|
|
|
|
|
|
$twofa = getparam('2fa', false); |
|
|
|
|
|
|
|
$ans = userSettings($user, null, $addrarr, $pass, $twofa); |
|
|
|
|
|
|
|
$err = 'Payout address changed'; |
|
|
|
|
|
|
|
$check = true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'Password': |
|
|
|
case 'Password': |
|
|
|
$oldpass = getparam('oldpass', false); |
|
|
|
$res = emailcheck($user); |
|
|
|
$pass1 = getparam('pass1', false); |
|
|
|
if ($res != null) |
|
|
|
$pass2 = getparam('pass2', false); |
|
|
|
$err = $res; |
|
|
|
$twofa = getparam('2fa', false); |
|
|
|
|
|
|
|
if (!safepass($pass1)) |
|
|
|
|
|
|
|
$err = 'Unsafe password. ' . passrequires(); |
|
|
|
|
|
|
|
elseif ($pass1 != $pass2) |
|
|
|
|
|
|
|
$err = "Passwords don't match"; |
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
$ans = setPass($user, $oldpass, $pass1, $twofa); |
|
|
|
$oldpass = getparam('oldpass', false); |
|
|
|
$err = 'Password changed'; |
|
|
|
$pass1 = getparam('pass1', false); |
|
|
|
$check = true; |
|
|
|
$pass2 = getparam('pass2', false); |
|
|
|
|
|
|
|
$twofa = getparam('2fa', false); |
|
|
|
|
|
|
|
if (!safepass($pass1)) |
|
|
|
|
|
|
|
$err = 'Unsafe password. ' . passrequires(); |
|
|
|
|
|
|
|
elseif ($pass1 != $pass2) |
|
|
|
|
|
|
|
$err = "Passwords don't match"; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$ans = setPass($user, $oldpass, $pass1, $twofa); |
|
|
|
|
|
|
|
$err = 'Password changed'; |
|
|
|
|
|
|
|
$check = true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|