Changeset 2452
- Timestamp:
- 01/25/2010 04:33:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-signup.php
r2300 r2452 217 217 } 218 218 219 /* Add a last active entry */ 220 update_usermeta( $user_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) ); 221 219 222 wp_new_user_notification( $user_id, $user_pass ); 220 223 … … 223 226 return $user_id; 224 227 } 228 229 function bp_core_map_user_registration( $user_id ) { 230 /* Only map data when the site admin is adding users, not on registration. */ 231 if ( !is_admin() ) 232 return false; 233 234 /* Add a last active entry */ 235 update_usermeta( $user_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) ); 236 237 /* Add the user's fullname to Xprofile */ 238 if ( function_exists( 'xprofile_set_field_data' ) ) { 239 $firstname = get_usermeta( $user_id, 'first_name' ); 240 $lastname = ' ' . get_usermeta( $user_id, 'last_name' ); 241 242 if ( !empty( $firstname ) || !empty( $lastname ) ) 243 xprofile_set_field_data( 1, $user_id, $firstname . $lastname ); 244 } 245 } 246 add_action( 'user_register', 'bp_core_map_user_registration' ); 225 247 226 248 function bp_core_signup_avatar_upload_dir() {
Note: See TracChangeset
for help on using the changeset viewer.