开发者

wp_update_user crashes my plugin for wordpress

I am trying to write a plugin which will update a user field. I can use the update user meta function OK, but when I try the wp_update_user it doesnt work.

wp_update_user($user_ID, 'user_nicename', 开发者_如何学Go'test');

That crashes the plugin. Do I need to include something for this function to work??


Read the Codex on wp_update_user() - you're not using it correctly. It should be;

wp_update_user(array('ID' => $user_ID, 'user_nicename' => 'test'));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜