diff --git a/batch/saveusers.php b/batch/saveusers.php index 73a0bd6812..ebd3d01076 100644 --- a/batch/saveusers.php +++ b/batch/saveusers.php @@ -95,10 +95,10 @@ private function parse_csvp(CsvParser $csv) { while (($line = $csv->next_row())) { $this->ustatus->set_user(Contact::make($this->conf)); $this->ustatus->clear_messages(); + $this->ustatus->start_update((object) ["id" => null]); $this->ustatus->csvreq = $line; - $this->ustatus->jval = (object) ["id" => null]; $this->ustatus->parse_csv_group(""); - if (($acct = $this->ustatus->save_user($this->ustatus->jval))) { + if (($acct = $this->ustatus->save_update())) { if ($this->quiet) { // print nothing } else if (empty($this->ustatus->diffs)) { diff --git a/etc/profilegroups.json b/etc/profilegroups.json index f021b6fea2..0f1351e9a0 100644 --- a/etc/profilegroups.json +++ b/etc/profilegroups.json @@ -49,7 +49,7 @@ "save_members": true, "inputs": false }, { "name": "security/reauthenticate", - "order": 1, "alias": "__reauthenticate" }, + "order": 999999, "alias": "__reauthenticate" }, { "name": "security/newpassword", "order": 100, "title": "Change password", "print_function": "*Security_UserInfo::print_new_password", @@ -72,7 +72,7 @@ "request_function": "*Developer_UserInfo::request", "save_members": true }, { "name": "developer/reauthenticate", - "order": 1, "alias": "__reauthenticate" }, + "order": 999999, "alias": "__reauthenticate" }, { "name": "developer/tokens", "title": "API tokens", "order": 10, "print_function": "*Developer_UserInfo::print_bearer_tokens", "inputs": false }, diff --git a/src/conference.php b/src/conference.php index c287de1c7e..207ba2fbc3 100644 --- a/src/conference.php +++ b/src/conference.php @@ -3257,7 +3257,8 @@ function unparse_time_iso8601($timestamp) { * @param int $now * @return string */ function unparse_time_relative($timestamp, $now = 0, $format = 0) { - $d = abs($timestamp - ($now ? : Conf::$now)); + $now = $now ? : Conf::$now; + $d = abs($timestamp - $now); if ($d >= 5227200) { if (!($format & 1)) { return ($format & 8 ? "on " : "") . $this->_date_unparse($timestamp, "obscure"); @@ -3291,7 +3292,7 @@ function unparse_time_relative($timestamp, $now = 0, $format = 0) { if ($format & 2) { return $d; } else { - return $timestamp < ($now ? : Conf::$now) ? $d . " ago" : "in " . $d; + return $timestamp < $now ? $d . " ago" : "in " . $d; } } diff --git a/src/pages/p_profile.php b/src/pages/p_profile.php index 03ef3d3359..9e734abcc8 100644 --- a/src/pages/p_profile.php +++ b/src/pages/p_profile.php @@ -224,7 +224,7 @@ private function save_user($ustatus, $acct) { } // save account - return $ustatus->save_user($ustatus->jval, $acct); + return $ustatus->save_update($acct); } @@ -312,7 +312,7 @@ private function save_bulk($text, $filename) { while (($line = $csv->next_row())) { $ustatus->set_user(Contact::make_placeholder($this->conf)); $ustatus->clear_messages(); - $ustatus->jval = (object) ["id" => null]; + $ustatus->start_update((object) ["id" => null]); $ustatus->csvreq = $line; $ustatus->parse_csv_group(""); $ustatus->notify = friendly_boolean($line["notify"]) ?? true; @@ -367,7 +367,7 @@ private function handle_save() { // prepare UserStatus $this->ustatus->set_user($this->user); - $this->ustatus->jval = (object) ["id" => $this->user->has_account_here() ? $this->user->contactId : "new"]; + $this->ustatus->start_update((object) ["id" => $this->user->has_account_here() ? $this->user->contactId : "new"]); $this->ustatus->no_deprivilege_self = true; if ($this->page_type !== 0) { $this->ustatus->update_profile_if_empty = true; diff --git a/src/userinfo/u_security.php b/src/userinfo/u_security.php index 10e808b85e..1328e100ab 100644 --- a/src/userinfo/u_security.php +++ b/src/userinfo/u_security.php @@ -66,7 +66,7 @@ static function print_reauthenticate(UserStatus $us) { } $us->cs()->add_section_class("form-outline-section tag-yellow w-text") ->print_start_section("Confirm account", "reauth"); - echo '
You must confirm your signin credentials before changing sensitive security settings.
'; + echo 'Please re-enter your signin credentials to change sensitive security settings.
'; $original_ignore_msgs = $us->swap_ignore_messages(false); $us->swap_ignore_messages($original_ignore_msgs); echo '