Changeset 167 for trunk/bp-xprofile/bp-xprofile-signup.php
- Timestamp:
- 06/19/08 17:10:30 (7 months ago)
- Files:
-
- 1 modified
-
trunk/bp-xprofile/bp-xprofile-signup.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-signup.php
r158 r167 291 291 function xprofile_on_activate( $blog_id = null, $user_id = null ) { 292 292 global $wpdb, $profile_picture_path; 293 293 294 294 // Extract signup meta fields to fill out profile 295 295 $field_ids = get_blog_option( $blog_id, 'xprofile_field_ids' ); 296 296 $field_ids = explode( ",", $field_ids ); 297 297 298 298 // Get the new user ID. 299 299 $sql = "SELECT u.ID from " . $wpdb->base_prefix . "users u, … … 302 302 AND um.meta_key = 'primary_blog' 303 303 AND um.meta_value = " . $blog_id; 304 304 305 305 $user_id = $wpdb->get_var($sql); 306 306 … … 326 326 if ( $resized && $original ) { 327 327 $upload_dir = bp_upload_dir(NULL, $blog_id); 328 328 329 329 if ( $upload_dir ) { 330 330 $resized_strip_path = explode( '/', $resized ); … … 349 349 // Render the cropper UI 350 350 $action = 'http://' . get_usermeta( $user_id, 'source_domain' ) . '/wp-activate.php?key=' . $_GET['key'] . '&cropped=true'; 351 xprofile_render_avatar_cropper($original, $resized, $action );351 xprofile_render_avatar_cropper($original, $resized, $action, $user_id); 352 352 353 353 //$result = xprofile_avatar_cropstore( $image, $image, $v1_x, $v1_y, XPROFILE_AVATAR_V1_W, XPROFILE_AVATAR_V1_H, $v2_x, $v2_y, XPROFILE_AVATAR_V2_W, XPROFILE_AVATAR_V2_H, true ); … … 368 368 369 369 $user_id = xprofile_get_user_by_key($_GET['key']); 370 370 371 371 if ( $user_id && isset($_POST['orig']) && isset($_POST['canvas']) ) { 372 echo "test is in here"; 372 373 xprofile_check_crop( $_POST['orig'], $_POST['canvas'] ); 373 374 $result = xprofile_avatar_cropstore( $_POST['orig'], $_POST['canvas'], $_POST['v1_x1'], $_POST['v1_y1'], $_POST['v1_w'], $_POST['v1_h'], $_POST['v2_x1'], $_POST['v2_y1'], $_POST['v2_w'], $_POST['v2_h'] ); 374 375 xprofile_avatar_save($result, $user_id); 375 376 } 376 377 377 378 if ( VHOST == 'yes' ) { 378 header('Location: http://' . $_SERVER['HTTP_HOST']);379 $url = 'http://' . get_usermeta( $user_id, 'source_domain' ) . '/'; 379 380 } else { 380 $path = explode( '/', $_SERVER['REQUEST_URI'] ); 381 header( 'Location:' . $path[0] . $path[1] . $path[2] ); 381 $url = 'http://' . get_usermeta( $user_id, 'source_domain' ) . '/' . get_usermeta( $user_id, 'nickname' ); 382 382 } 383 384 header("Location: $url"); 383 385 } 384 386 }
