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 .= "