diff --git a/pool/db.php b/pool/db.php index 7d87beee..edccad1d 100644 --- a/pool/db.php +++ b/pool/db.php @@ -225,7 +225,7 @@ function userReg($user, $email, $pass) return repDecode($rep); } # -function userSettings($user, $email = null, $addr = null, $pass = null) +function userSettings($user, $email = null, $addr = null, $pass = null, $twofa = null) { $tmo = false; $flds = array('username' => $user); @@ -247,7 +247,12 @@ function userSettings($user, $email = null, $addr = null, $pass = null) $tmo = 3; # 3x the timeout } if ($pass != null) + { $flds['passwordhash'] = myhash($pass); + if ($twofa === null) + $twofa = ''; + $flds['2fa'] = $twofa; + } $msg = msgEncode('usersettings', 'userset', $flds, $user); $rep = sendsockreply('userSettings', $msg, $tmo); if (!$rep) diff --git a/pool/page_addrmgt.php b/pool/page_addrmgt.php index 0ef12d85..33b3e21f 100644 --- a/pool/page_addrmgt.php +++ b/pool/page_addrmgt.php @@ -72,13 +72,24 @@ function addrmgtuser($data, $user, $err) else $row = 'odd'; $pg .= ""; - $pg .= ''; + $pg .= ''; $pg .= 'Password: '; - $pg .= ' '; + $pg .= ' '; + + if ((($offset++) % 2) == 0) + $row = 'even'; + else + $row = 'odd'; + $pg .= ""; + $pg .= ''; + $pg .= '*2nd Authentication: '; + $pg .= ''; + + $pg .= ""; + $pg .= 'You must enter your password to save changes
'; + $pg .= "*Leave blank if you haven't enabled it
"; + $pg .= 'A ratio of 0, will remove the address from the payouts
'; } - $pg .= '*'; - $pg .= ' You must enter your password to save changes
'; - $pg .= 'A ratio of 0, will remove the address from the payouts
'; $pg .= "\n"; $pg .= "