This is how I would update a field named ‘Address’:
function updateAddress() {
global $current_user;
get_currentuserinfo();
$newAddress="123 New Street";
xprofile_set_field_data('Address', $current_user->id, $newAddress);
}
Related Posts:
- How to display random users with avatars
- How can I add an image field to BuddyPress Extended Profile Fields? [closed]
- Remove the deleted users avatar from list
- Adding fields to the “Add New User” screen in the dashboard
- How to check if a user exists by a given id
- Use author author display name in permalink structure for pages and posts
- Get a list of all available fields in the User Profile
- Logout redirect to current page – function
- How to paginate the get_users function?
- How to manually activate user in dashboard only by admin
- Add new user : make the fields First Name and Last name required
- wp_delete_user with username
- BuddyPress: What’s the use of wp_bp_xprofile_data table and how does it get updated? [closed]
- Change labels on ‘Nickname’ and ‘Biographical Info’ in user-edit.php
- Order get_users() by last login date. Is it possible?
- How can I tell when a user is logged in?
- Most efficient way to get custom database records from 20 buttons and 20 tables?
- how to get and display logged in user’s recently read posts
- Displaying a random user with a shortcode
- How to detect first visit of a user?
- Can I pass two roles to the function get_users?
- Create dropdown of users in admin dashboard
- Best Practice for Syncing Local Development With Staging Development [closed]
- password protected post policy
- Is it good practice to use wpdb->query() function?
- Check if row exists before inserting
- Get Current User info using wp_localize_script, in functions.php
- when I fetch data from remote mysql database in wordpress built in wordpress function is not working?
- How to add custom fields to my custom registration form
- WordPress shortcode attributes for database SELECT?
- create shortcode to list users with specific meta key value
- Change WordPress prefix for only one table?
- Don’t delete a page if it holds users
- How to limit character length in BuddyPress function output [closed]
- How to make custom column Admin>Users sortable?
- Updating Media Published Date When Parent Post Is Modified in WordPress
- Execute a ultimate member action when user role is updated
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- Force to use STRONG users password and implement rule to prevent REUSE [closed]
- Change label for registration Fields
- MS Access to manage WordPress Database
- Get User Login Data (date, time… )
- Multisite 404 on pages – rewrite error breaks database
- Accessing two databases wordpress
- Connecting to a 2nd DB gives me no results when querying
- How to set the default avatar of buddypress avatar [closed]
- Is There Any Built In WP Functionality For Combining Form Fields To Return Specific Data
- Condition OR for current user ID
- Dequeue script to prevent javascript event conflict on wordpress child theme
- How to Use Global Variables Inside Header and Footer
- Secondary Menu and Logged In Users
- Why get_user_by() doesn’t work in my code?
- Filter to wp_list_authors
- Check if a value exists in database table
- Hide tab Buddypress profile for visitors, not logged in users
- How to add array [closed]
- Add Link to Users List (Backend) to open each users front-end profile
- Suggest Users basing on User taxonomy
- wp_usermeta – Read from database, but save function broken
- Showing user profile data on front-end
- How do I pull avatar from post using BuddyPress? [closed]
- Modify function to only return values for the user that’s logged in
- loginout function customization
- User meta and public function security
- call wp_insert_user in custom class doesnt work
- Get users with different roles and call function on each of them (user_meta)
- Show errormessages on wrong username/password on custom loginform?
- How can I show different content for different user-levels?
- Custom user role still showing up after deletion, ideas?
- referencing the current user in a page i created in wordpress
- How to loop while adding data to database?
- Show metadata in users.php – wordpress
- Change wordpress’ database data using ajax – how to get current user id?
- How can I connect to a second database and still be able to use wp functions like get_post_types()?
- Writing a function for WP Cron to run a SQL command daily
- Update wp_postmeta table based on 2 keys
- Deleting guests profile users after 1.5 hours
- wp_get_current_user return ID = 0 when used outside of wordpress, such as webhook / fulfillment dialogflow
- Allow user only create specific tags
- Add Change role button for list of user in an event
- get_current_user_id() always return 0 in if else statement
- Button click counter for login user
- Changing author links on homepage to buddypress profiles – without affecting ability to link to author archive throughout the site
- Function stops working
- Show users last read posts for each user?
- How to add number to wordpress count function?
- Database SQL Error, Should Work
- Database Query not working
- Function to get the name in database table from the comma separated string
- get USER ID in functions.php using user_register action
- Unhook the comment form in Buddypress
- Functions file mods and CPU
- How can i hide content if not friend in Buddypress? [closed]
- Sessions in word press [duplicate]
- Bulk set Post Title as Tag where Tag is Empty Function
- Whats the proper way to add a new user via a front end form?
- sort by date in users
- hide shortcode using hooks
- Using depth=n in wp_list_pages
- shorthand syntax for custom fields