From: Kevin Day Date: Sat, 3 Feb 2018 06:12:49 +0000 (-0600) Subject: Bugfix: error message for current user is using incorrect/non-existent variable X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=ae26970075bbbe89d17e8069f27f33acc19dd6f3;p=koopa Bugfix: error message for current user is using incorrect/non-existent variable --- diff --git a/common/standard/classes/standard_index.php b/common/standard/classes/standard_index.php index 299484f..e002fc3 100644 --- a/common/standard/classes/standard_index.php +++ b/common/standard/classes/standard_index.php @@ -545,7 +545,17 @@ class c_standard_index extends c_base_return { $this->session->set_user_current($user_current); } else { - $error = c_base_error::s_log(NULL, ['arguments' => [':{account_name}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_ACCOUNT); + $account_name = $user_current->get_name_machine(); + if ($account_name instanceof c_base_return_string) { + $account_name = $account_name->get_value_exact(); + } + else { + $account_name = ''; + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{account_name}' => $account_name, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_ACCOUNT); + unset($account_name); + return c_base_return_error::s_false($error); } unset($user_current);