wp_update_userの使用法
-
ログインユーザーのプロフィール変更フォームを任意で設置したいのですが
wp_update_userの使い方を誤っていますでしょうか?
それともほかのメソッドを使うのでしょうか?
(下記のuser_lastnameはテストとして用いています)`
<?php
global $wpdb,$current_user;
get_currentuserinfo();if( empty($_POST[‘user_lastname’]) == TRUE ) {
?>
<form action=”<?php the_permalink(); ?>” method=”post”>
<label for=”user_lastname”></label>
<input type=”text” id=”user_lastname” name=”user_lastname” value=”TEST” />
<input type=”submit” value=”送信”>
</form>
<?php
} else {
wp_update_user( array (‘ID’ => $current_user->id, ‘user_lastname’ => $_POST[‘user_lastname’]) ) ;
}
`よろしくお願いします。
2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
- トピック「wp_update_userの使用法」には新たに返信することはできません。