Changeset 2818
- Timestamp:
- 03/08/2010 03:28:57 PM (15 years ago)
- Location:
- branches/1.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-core/bp-core-signup.php
r2695 r2818 235 235 $bp->signup->username = $user_login; 236 236 237 do_action( 'bp_core_signup_user', $user_id, $user_login, $user_password, $user_email, $usermeta ); 238 237 239 return $user_id; 238 240 } -
branches/1.2/bp-groups.php
r2816 r2818 1545 1545 } 1546 1546 1547 groups_update_groupmeta( $group->id, 'last_activity', gmdate( "Y-m-d H:i:s" ) ); 1547 1548 do_action( 'groups_settings_updated', $group->id ); 1548 1549 -
branches/1.2/bp-xprofile.php
r2794 r2818 888 888 * @package BuddyPress Core 889 889 */ 890 function xprofile_sync_wp_profile( ) {890 function xprofile_sync_wp_profile( $user_id = false ) { 891 891 global $bp, $wpdb; 892 892 … … 894 894 return true; 895 895 896 $fullname = xprofile_get_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $bp->loggedin_user->id ); 896 if ( empty( $user_id ) ) 897 $user_id = $bp->loggedin_user->id; 898 899 if ( empty( $user_id ) ) 900 return false; 901 902 $fullname = xprofile_get_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $user_id ); 897 903 $space = strpos( $fullname, ' ' ); 898 904 … … 905 911 } 906 912 907 update_usermeta( $ bp->loggedin_user->id, 'nickname', $fullname );908 update_usermeta( $ bp->loggedin_user->id, 'first_name', $firstname );909 update_usermeta( $ bp->loggedin_user->id, 'last_name', $lastname );910 911 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $ bp->loggedin_user->id ) );912 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d", bp_core_get_user_domain( $ bp->loggedin_user->id ), $bp->loggedin_user->id ) );913 update_usermeta( $user_id, 'nickname', $fullname ); 914 update_usermeta( $user_id, 'first_name', $firstname ); 915 update_usermeta( $user_id, 'last_name', $lastname ); 916 917 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $user_id ) ); 918 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d", bp_core_get_user_domain( $user_id ), $user_id ) ); 913 919 } 914 920 add_action( 'xprofile_updated_profile', 'xprofile_sync_wp_profile' ); 915 921 add_action( 'bp_core_signup_user', 'xprofile_sync_wp_profile' ); 916 922 917 923 /**
Note: See TracChangeset
for help on using the changeset viewer.