{"id":5653905,"date":"2015-01-09T18:50:52","date_gmt":"2015-01-09T18:50:52","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/wp_login-second-parameter-missing\/"},"modified":"2016-08-22T15:14:44","modified_gmt":"2016-08-22T15:14:44","slug":"wp_login-second-parameter-missing","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/wp_login-second-parameter-missing\/","title":{"rendered":"wp_login &#8211; second parameter missing"},"content":{"rendered":"<p>Pie Register triggers the WordPress action <code>wp_login<\/code> at some points.<\/p>\n<p>I&#8217;ve noticed that the action is called like this:<br \/>\n<code>do_action( &#039;wp_login&#039;, $user-&gt;user_login )<\/code><\/p>\n<p>This causes an error in other plugins (namely Protected Content by WPMU Dev), because the wp_login should be called with 2 parameters. <\/p>\n<p>I suggest to update the plugin to call the hook like this:<br \/>\n<code>do_action( &#039;wp_login&#039;, $user-&gt;user_login, $user )<\/code><\/p>\n<p>According to the Codex:<br \/>\n<a href=\"https:\/\/codex.wordpress.org\/Plugin_API\/Action_Reference\/wp_login\">codex.wordpress.org\/Plugin_API\/Action_Reference\/wp_login<\/a><\/p>\n<blockquote>\n<p>This hook provides access to two parameters: $user-&gt;user_login (string) and $user ( WP_User )\n<\/p>\n<\/blockquote>\n<p>https:\/\/wordpress.org\/plugins\/pie-register\/<\/p>\n","protected":false},"template":"","class_list":["post-5653905","topic","type-topic","status-closed","hentry","topic-tag-wp_login"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5653905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5653905\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5653905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}