]> Kevux Git Server - koopa/commitdiff
Bugfix: error message for current user is using incorrect/non-existent variable
authorKevin Day <thekevinday@gmail.com>
Sat, 3 Feb 2018 06:12:49 +0000 (00:12 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 3 Feb 2018 06:12:49 +0000 (00:12 -0600)
common/standard/classes/standard_index.php

index 299484f3aa89768bb5839da26fc25bbc09609f75..e002fc3b3900afb27a407d30a29cdae9da22748e 100644 (file)
@@ -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);