0

この配列user_loginで、のようなキーの値を取得する方法email

、のようforeachにすべて試しましたが、値が得られませんでした。array keysarray['user_login']

私はワードプレスで働いています。print_rこのように配列データを出力します

$array=$_SESSION;
print_r($array);

配列 ( [ユーザーデータ] => __PHP_Incomplete_Class オブジェクト ( [__PHP_Incomplete_Class_Name] => WP_User [データ] => stdClass オブジェクト ( [ID] => 1 [user_login] => admin [user_pass] => $P$BZzVW3B4g2f6pgocN3iu9h4J0CFmCj1 [user_nicename] =>管理者 [user_email] => abc@gmail.com [user_url] => [user_registered] => 2013-05-22 02:21:09 [user_activation_key] => [user_status] => 0 [display_name] => admin ) [ ID] => 1 [caps] => 配列 ([管理者] => 1) [cap_key] => wp_capabilities [役割] => 配列 ([0] => 管理者) [allcaps] => 配列 ([switch_themes] = > 1 [edit_themes] => 1 [activate_plugins] => 1 [edit_plugins] => 1 [edit_users] => 1 [edit_files] => 1 [manage_options] => 1 [moderate_comments] => 1 [manage_categories] => 1 [manage_links] =>1 [upload_files] => 1 [import] => 1 [unfiltered_html] => 1 [edit_posts] => 1 [edit_others_posts] => 1 [edit_published_posts] => 1 [publish_posts] => 1 [edit_pages] => 1 [ read] => 1 [level_10] => 1 [level_9] => 1 [level_8] => 1 [level_7] => 1 [level_6] => 1 [level_5] => 1 [level_4] => 1 [level_3] => 1 [level_2] => 1 [level_1] => 1 [level_0] => 1 [edit_others_pages] => 1 [edit_published_pa​​ges] => 1 [publish_pages] => 1 [delete_pages] => 1 [delete_others_pages] => 1 [delete_published_pa​​ges] => 1 [delete_posts] => 1 [delete_others_posts] => 1 [delete_published_posts] => 1 [delete_private_posts] => 1 [edit_private_posts] => 1 [read_private_posts] => 1 [delete_private_pages] => 1 [ edit_private_pages] => 1 [read_private_pages] =>1 [delete_users] => 1 [create_users] => 1 [unfiltered_upload] => 1 [edit_dashboard] => 1 [update_plugins] => 1 [delete_plugins] => 1 [install_plugins] => 1 [update_themes] => 1 [ install_themes] => 1 [update_core] => 1 [list_users] => 1 [remove_users] => 1 [add_users] => 1 [promote_users] => 1 [edit_theme_options] => 1 [delete_themes] => 1 [export] => 1 [simple_tags] => 1 [admin_simple_tags] => 1 [管理者] => 1 ) [filter] => ) )1 [edit_theme_options] => 1 [delete_themes] => 1 [export] => 1 [simple_tags] => 1 [admin_simple_tags] => 1 [administrator] => 1 ) [filter] => ) )1 [edit_theme_options] => 1 [delete_themes] => 1 [export] => 1 [simple_tags] => 1 [admin_simple_tags] => 1 [administrator] => 1 ) [filter] => ) )

4

1 に答える 1

0

試しましたか

$_SESSION>userdata('user_login');

user_login を取得するには?

于 2013-06-05T11:55:21.127 に答える