wp_update_user problem
-
I am trying to make a profil.php page that will allow users to access their profiles either integrated into the design. So I have my file that works well for backup usermeta it well in db and puts me in the corresponding fields. I would like to allow the user to change his password and / or email, website on the same page as the wordpress user page.
My code is as follows in the head:<?php $user = wp_get_current_user(); if($user->ID == 0){ header('location:/dogepress'); } if(!empty($_POST)){ update_user_meta(get_current_user_id(),'scrypt',$_POST['scrypt']); update_user_meta(get_current_user_id(),'sha256',$_POST['sha256']); } $user_id=$current_user->ID; $user = wp_update_user(array( 'ID' => $user_id, 'user_email' => $d['user_email'], 'first_name' => $d['user_first_name'], 'last_name' => $d['user_last_name'], 'display_name' => $d['user_display_name'], 'user_url' => $d['user_url'], ));
?>
and the code in html is:
<label for=”user_url”>Website:</label>
<input type=”text” value=”<?php echo isset($current_user->user_url) ? ($current_user->user_url ): ”; ?>” name=”user_url” id=”user_url”>
`
Can you help me
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘wp_update_user problem’ is closed to new replies.