如何从LP_User对象查询电子邮件或user_login

时间:2018-09-22 05:04:47

标签: php mysql wordpress wordpress-theming

是否可以通过LP_User对象ID查询用户电子邮件?我已查询过,但所有用户个人资料中都显示相同的电子邮件(第一用户电子邮件)。我想为其他用户显示不同的电子邮件。我搜索了很多,但是没有找到任何解决方案。还请向我解释是否可以查询受保护的物品?

谢谢

object(LP_User)#1243 (19) {
  ["user"]=>
  bool(false)
  ["quiz"]=>
  bool(false)
  ["_quiz_history_id":protected]=>
  NULL
  ["_FOUND_ROWS":protected]=>
  int(0)
  ["_courses":protected]=>
  array(0) {
  }
  ["_course_items":protected]=>
  array(0) {
  }
  ["profile_picture_src"]=>
  NULL
  ["profile_picture_type"]=>
  NULL
  ["_data":protected]=>
  array(1) {
    [0]=>
    int(1)
  }
  ["_curd":protected]=>
  object(LP_User_CURD)#1242 (4) {
    ["_meta_type":protected]=>
    string(4) "user"
    ["_user_id":protected]=>
    int(0)
    ["_course_id":protected]=>
    int(0)
    ["_error_messages":protected]=>
    bool(false)
  }
  ["_id":protected]=>
  int(1)
  ["_extra_data":protected]=>
  array(13) {
    ["email"]=>
    string(22) "jilani.pabel@gmail.com"
    ["user_login"]=>
    string(7) "jlani53"
    ["description"]=>
    string(149) "He attended and graduated from medical school in 1976, having over 42 years of diverse experience, especially in Cardiovascular Disease (Cardiology)."
    ["first_name"]=>
    string(5) "Steve"
    ["last_name"]=>
    string(4) "Jobs"
    ["nickname"]=>
    string(7) "jlani53"
    ["display_name"]=>
    string(10) "Steve Jobs"
    ["date_created"]=>
    string(19) "2018-09-18 18:12:21"
    ["date_modified"]=>
    string(0) ""
    ["role"]=>
    string(13) "administrator"
    ["roles"]=>
    array(1) {
      [0]=>
      string(13) "administrator"
    }
    ["profile_picture"]=>
    string(0) ""
    ["profile_publicity"]=>
    string(0) ""
  }
  ["_no_cache":protected]=>
  bool(false)
  ["_supports":protected]=>
  array(0) {
  }
  ["_changes":protected]=>
  array(0) {
  }
  ["_extra_data_changes":protected]=>
  array(0) {
  }
  ["_meta_data":protected]=>
  array(0) {
  }
  ["_meta_keys":protected]=>
  array(0) {
  }
  ["_setup_postdata":protected]=>
  bool(false)
}

0 个答案:

没有答案