{"id":4695,"date":"2015-03-04T17:38:39","date_gmt":"2015-03-04T15:38:39","guid":{"rendered":"http:\/\/mummila.net\/kommentit\/?p=4695"},"modified":"2015-03-04T17:38:39","modified_gmt":"2015-03-04T15:38:39","slug":"i-would-highly-recommend-daniels-much-simpler-solution","status":"publish","type":"post","link":"https:\/\/mummila.net\/kommentit\/2015\/03\/04\/i-would-highly-recommend-daniels-much-simpler-solution\/","title":{"rendered":"I would highly recommend Daniel&#8217;s much simpler solution"},"content":{"rendered":"<p>I would highly recommend <a href=\"http:\/\/wordpress.stackexchange.com\/questions\/165691\/how-to-check-if-a-user-exists-by-a-given-id?newreg=facba1fd28d2459cac4f198e50837b73#comment239745_165693\">Daniel&#8217;s much simpler solution<\/a> over the one currently selected as correct:<\/p>\n<pre class=\"default prettyprint prettyprinted\"><code>$user = get_userdata( $user_id );\r\nif ( $user == false ) {\r\n    \/\/user id does not exist\r\n} else {\r\n    \/\/user id exists\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I would highly recommend Daniel&#8217;s much simpler solution over the one currently selected: get_userdata($user_id);.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3922],"tags":[2965],"class_list":["post-4695","post","type-post","status-publish","format-standard","hentry","category-aiheeton","tag-wordpress","sijainti-stack-exchange"],"_links":{"self":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/4695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/comments?post=4695"}],"version-history":[{"count":1,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/4695\/revisions"}],"predecessor-version":[{"id":4696,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/4695\/revisions\/4696"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/media?parent=4695"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/categories?post=4695"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/tags?post=4695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}