Created
July 6, 2013 20:53
-
-
Save rolandinsh/5941257 to your computer and use it in GitHub Desktop.
update BuddyPress xprofile programmatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function smc_update_xprofile($userid,$field,$value) { | |
// alternative to get user ID | |
// global $current_user; | |
// get_currentuserinfo(); | |
// $field = 'Foo'; // xProfile field name | |
// $value = 'bar'; // desired value | |
// xprofile_set_field_data($field, $current_user->id, $value); | |
xprofile_set_field_data($field, $userid, $value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment