HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/dk/wp-content/themes/food/api/user/r_user_setting.php
<?php
$current_user = wp_get_current_user();
$current_id = $current_user->ID;
if($current_id == 0) {
  $rc = 1;
  return false;
}

$res = [
  'user_nicename' => $current_user->data->user_nicename,
  'user_phone' => get_user_meta($current_id, 'user_phone', true),
  'user_email' => get_user_meta($current_id, 'user_email', true),
  'user_address' => [
    'address1' => get_user_meta($current_id, 'address1', true),
    'address2' => get_user_meta($current_id, 'address2', true),
    'address3' => get_user_meta($current_id, 'address3', true),
    'address4' => get_user_meta($current_id, 'address4', true),
  ],
  'address_current' => get_user_meta($current_id, 'address_current', true)
];