User registration & user profile – Profile Builder - Version 1.1.41

Version Description

Email Confirmation bug on WPMU fixed.

Download this release

Release Info

Developer barinagabriel
Plugin Icon 128x128 User registration & user profile – Profile Builder
Version 1.1.41
Comparing to
See all releases

Code changes from version 1.1.40 to 1.1.41

front-end/wppb.edit.profile.php CHANGED
@@ -80,15 +80,10 @@ function wppb_front_end_profile_info() {
80
 
81
  //fallback if the file was largen then post_max_size, case in which no errors can be saved in $_FILES[fileName]['error']
82
  if (empty($_FILES) && empty($_POST) && isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
83
- $editProfileFilterArray['noPost'] = '
84
- <p class="error">'.
85
- __('The information size you were trying to submit was larger than', 'profilebuilder') .' '. WPPB_SERVER_MAX_UPLOAD_SIZE_MEGA .'b!<br/>'.
86
- __('This is usually caused by a large file(s) trying to be uploaded.', 'profilebuilder') .'<br/>'.
87
- __('Since it was also larger than', 'profilebuilder') .' '. WPPB_SERVER_MAX_POST_SIZE_MEGA .'b '. __('no additional information is available.', 'profilebuilder') .'<br/>
88
- </p>';
89
- $editProfileFilterArray['noPost'] = apply_filters('wppb_edit_profile_no_post_error', $editProfileFilterArray['noPost']);
90
- echo $editProfileFilterArray['noPost'];
91
  }
 
92
  // a way to catch the user before updating his/her profile without completing a required field
93
  if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'update-user' && wp_verify_nonce($_POST['edit_nonce_field'],'verify_edit_user') ) {
94
  //variable to control whether the user submitted data or not
@@ -272,197 +267,156 @@ function wppb_front_end_profile_info() {
272
  }
273
 
274
  /* update the extra profile information */
275
- $wppb_premium = WPPB_PLUGIN_DIR . '/premium/functions/';
276
- if (file_exists ( $wppb_premium.'extra.fields.php' )){
277
- $wppbFetchArray = get_option('wppb_custom_fields');
278
- foreach ( $wppbFetchArray as $key => $value){
279
- switch ($value['item_type']) {
280
- case "input":{
281
- $_POST[$value['item_type'].$value['id']] = apply_filters('wppb_edit_profile_input_custom_field_'.$value['id'], $_POST[$value['item_type'].$value['id']]);
282
- if (isset($value['item_required'])){
283
- if ($value['item_required'] == 'yes'){
284
- if (trim($_POST[$value['item_type'].$value['id']]) != '')
285
- update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
286
- else
287
- array_push($extraFieldsErrorHolder, $value['id']);
288
- }else
289
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
 
 
290
  }else
291
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
292
-
293
- break;
294
- }
295
- case "hiddenInput":{
296
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
297
 
298
- break;
299
- }
300
- case "checkbox":{
301
- $checkboxOption = '';
302
- $checkboxValue = explode(',', $value['item_options']);
303
- foreach($checkboxValue as $thisValue){
304
- $thisValue = str_replace(' ', '#@space@#', $thisValue); //we need to escape the space-codification we sent earlier in the post
305
- if (isset($_POST[$thisValue.$value['id']])){
306
- $localValue = str_replace('#@space@#', ' ', $_POST[$thisValue.$value['id']]);
307
- $checkboxOption = $checkboxOption.$localValue.',';
308
- }
 
 
 
 
309
  }
310
-
311
- if (isset($value['item_required'])){
312
- if ($value['item_required'] == 'yes'){
313
- if (trim($checkboxOption) != '')
314
- update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $checkboxOption ) );
315
- else
316
- array_push($extraFieldsErrorHolder, $value['id']);
317
- }else
318
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $checkboxOption ) );
 
 
319
  }else
320
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $checkboxOption ) );
321
-
322
- break;
323
- }
324
- case "radio":{
325
- if (isset($value['item_required'])){
326
- if ($value['item_required'] == 'yes'){
327
- if (trim($_POST[$value['item_type'].$value['id']]) != '')
328
- update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
329
- else
330
- array_push($extraFieldsErrorHolder, $value['id']);
331
- }else
332
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
 
 
333
  }else
334
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
335
- break;
336
- }
337
- case "select":{
338
- if (isset($value['item_required'])){
339
- if ($value['item_required'] == 'yes'){
340
- if (trim($_POST[$value['item_type'].$value['id']]) != '')
341
- update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
342
- else
343
- array_push($extraFieldsErrorHolder, $value['id']);
344
- }else
345
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
 
 
346
  }else
347
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
348
- break;
349
- }
350
- case "countrySelect":{
351
- if (isset($value['item_required'])){
352
- if ($value['item_required'] == 'yes'){
353
- if (trim($_POST[$value['item_type'].$value['id']]) != '')
354
- update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
355
- else
356
- array_push($extraFieldsErrorHolder, $value['id']);
357
- }else
358
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
 
 
359
  }else
360
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
361
-
362
- break;
363
- }
364
- case "timeZone":{
365
- if (isset($value['item_required'])){
366
- if ($value['item_required'] == 'yes'){
367
- if (trim($_POST[$value['item_type'].$value['id']]) != '')
368
- update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
369
- else
370
- array_push($extraFieldsErrorHolder, $value['id']);
371
- }else
372
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
 
 
373
  }else
374
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
375
-
376
- break;
377
- }
378
- case "datepicker":{
379
- if (isset($value['item_required'])){
380
- if ($value['item_required'] == 'yes'){
381
- if (trim($_POST[$value['item_type'].$value['id']]) != '')
382
- update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
383
- else
384
- array_push($extraFieldsErrorHolder, $value['id']);
385
- }else
386
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
 
 
387
  }else
388
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
389
-
390
- break;
391
- }
392
- case "textarea":{
393
- if (isset($value['item_required'])){
394
- if ($value['item_required'] == 'yes'){
395
- if (trim($_POST[$value['item_type'].$value['id']]) != '')
396
- update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
397
- else
398
- array_push($extraFieldsErrorHolder, $value['id']);
399
- }else
400
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
 
 
401
  }else
402
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
403
 
404
- break;
405
- }
406
- case "upload":{
407
- $uploadedfile = $value['item_type'].$value['id'];
408
-
409
- //get allowed file types
410
- if (($value['item_options'] != NULL) || ($value['item_options'] != '')){
411
- $allFiles = false;
412
- $extensions = explode(',', $value['item_options']);
413
- foreach($extensions as $key3 => $value3)
414
- $extensions[$key3] = trim($value3);
415
- }else
416
- $allFiles = true;
417
- //first we need to verify if we don't try to upload a 0b or 0 length file
418
- if ( (basename( $_FILES[$uploadedfile]['name']) != '')){
419
- //get this attachments extension
420
- $thisFileExtStart = strrpos($_FILES[$uploadedfile]['name'], '.');
421
- $thisFileExt = substr($_FILES[$uploadedfile]['name'], $thisFileExtStart);
422
-
423
- if ($allFiles === false){
424
- if (in_array($thisFileExt, $extensions)){
425
- //second we need to verify if the uploaded file size is less then the set file size in php.ini
426
- if (($_FILES[$uploadedfile]['size'] < WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE) && ($_FILES[$uploadedfile]['size'] !=0)){
427
- //we need to prepare the basename of the file, so that ' becomes ` as ' gives an error
428
- $fileName = basename( $_FILES[$uploadedfile]['name']);
429
- $finalFileName = '';
430
-
431
- for ($i=0; $i < strlen($fileName); $i++){
432
- if ($fileName[$i] == "'")
433
- $finalFileName .= '`';
434
- else $finalFileName .= $fileName[$i];
435
- }
436
-
437
- //create the target path for uploading
438
- $wpUploadPath = wp_upload_dir(); // Array of key => value pairs
439
- $target_path = $wpUploadPath['basedir']."/profile_builder/attachments/";
440
- $target_path = $target_path . 'userID_'.$current_user->id.'_attachment_'. $finalFileName;
441
-
442
- if (move_uploaded_file($_FILES[$uploadedfile]['tmp_name'], $target_path)){
443
- $upFile = $wpUploadPath['baseurl'].'/profile_builder/attachments/userID_'.$current_user->id.'_attachment_'. $finalFileName;
444
- update_user_meta( $current_user->id, $value['item_metaName'], $upFile);
445
- $pictureUpload = 'yes';
446
- }else{
447
- //insert the name of the file in an array so that in case an error comes up, we know which files we just uploaded
448
- array_push($uploadName, basename( $_FILES[$uploadedfile]['name']));
449
- }
450
- }else{
451
- //insert the name of the file in an array so that in case an error comes up, we know which files we just uploaded
452
- array_push($uploadName, basename( $_FILES[$uploadedfile]['name']));
453
- }
454
- }else{
455
- array_push($uploadExt, basename( $_FILES[$uploadedfile]['name']));
456
- $allowedExtensions = '';
457
- (int)$nrOfExt = count($extensions)-2;
458
- foreach($extensions as $key4 => $value4){
459
- $allowedExtensions .= $value4;
460
- if ($key4 <= $nrOfExt)
461
- $allowedExtensions .= ', ';
462
-
463
- }
464
- }
465
- }else{
466
  //second we need to verify if the uploaded file size is less then the set file size in php.ini
467
  if (($_FILES[$uploadedfile]['size'] < WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE) && ($_FILES[$uploadedfile]['size'] !=0)){
468
  //we need to prepare the basename of the file, so that ' becomes ` as ' gives an error
@@ -492,489 +446,516 @@ function wppb_front_end_profile_info() {
492
  //insert the name of the file in an array so that in case an error comes up, we know which files we just uploaded
493
  array_push($uploadName, basename( $_FILES[$uploadedfile]['name']));
494
  }
 
 
 
 
 
 
 
 
 
 
495
  }
496
- }
497
- break;
498
- }
499
- case "avatar":{
500
- $avatarUpload = 'no';
501
- $uploadedfile = $value['item_type'].$value['id'];
502
- $wpUploadPath = wp_upload_dir(); // Array of key => value pairs
503
- $target_path_original = $wpUploadPath['basedir']."/profile_builder/avatars/";
504
- $fileName = $_FILES[$uploadedfile]['name'];
505
- $finalFileName = '';
506
 
507
- for ($i=0; $i < strlen($fileName); $i++){
508
- if ($fileName[$i] == "'")
509
- $finalFileName .= '`';
510
- elseif ($fileName[$i] == ' ')
511
- $finalFileName .= '_';
512
- else $finalFileName .= $fileName[$i];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
513
  }
514
-
515
- $fileName = $finalFileName;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
516
 
517
- $target_path = $target_path_original . 'userID_'.$current_user->id.'_originalAvatar_'. $fileName;
518
 
519
- /* when trying to upload file, be sure it's one of the accepted image file-types */
520
- if ( (($_FILES[$uploadedfile]['type'] == 'image/jpeg') || ($_FILES[$uploadedfile]['type'] == 'image/jpg') || ($_FILES[$uploadedfile]['type'] == 'image/png') || ($_FILES[$uploadedfile]['type'] == 'image/bmp') || ($_FILES[$uploadedfile]['type'] == 'image/pjpeg') || ($_FILES[$uploadedfile]['type'] == 'image/x-png')) && (($_FILES[$uploadedfile]['size'] < WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE) && ($_FILES[$uploadedfile]['size'] !=0)) ){
521
- $avatarUpload = 'yes';
522
- $wp_filetype = wp_check_filetype(basename( $_FILES[$uploadedfile]['name']), null );
523
- $attachment = array(
524
- 'post_mime_type' => $wp_filetype['type'],
525
- 'post_title' => $fileName,
526
- 'post_content' => '',
527
- 'post_status' => 'inherit'
528
- );
529
 
530
 
531
- $attach_id = wp_insert_attachment( $attachment, $target_path);
532
-
533
- $upFile = image_downsize( $attach_id, 'thumbnail' );
534
- $upFile = $upFile[0];
535
-
536
- //if file upload succeded
537
- if (move_uploaded_file($_FILES[$uploadedfile]['tmp_name'], $target_path)){
538
- update_user_meta( $current_user->id, $value['item_metaName'], $upFile);
539
- update_user_meta( $current_user->id, 'resized_avatar_'.$value['id'], '');
540
 
541
- }else $avatarUpload = 'no';
542
- }elseif ( (($_FILES[$uploadedfile]['size'] > WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE) || ($_FILES[$uploadedfile]['size'] == 0)) && ($fileName != '') )
543
- $avatarUpload = 'no';
544
- elseif ($fileName == '')
545
- $avatarUpload = 'yes';
546
- break;
547
- }
548
  }
549
  }
550
  }
 
551
 
552
  }
553
 
554
  ?>
555
  <div class="wppb_holder" id="wppb_modify">
556
  <?php
557
- if ( !is_user_logged_in() ) :
558
  $editProfileFilterArray['notLoggedIn'] = '
559
  <p class="warning">'. __('You must be logged in to edit your profile.', 'profilebuilder') .'</p><!-- .warning -->';
560
- $editProfileFilterArray['notLoggedIn'] = apply_filters('wppb_edit_profile_user_not_logged_in', $editProfileFilterArray['notLoggedIn']);
561
- echo $editProfileFilterArray['notLoggedIn'];
562
 
563
- else :
564
- {
565
  /* messages for the the delete avatar/attachment */
566
  if (isset($_GET['fileType'])){
567
  if ($_GET['fileType'] == 'avatar'){
568
  $editProfileFilterArray['avatarChangesSaved'] = '
569
  <p class="changes-saved">'. __('The avatar was successfully deleted.', 'profilebuilder') .'</p><!-- .changes-saved -->';
570
- $editProfileFilterArray['avatarChangesSaved'] = apply_filters('wppb_edit_profile_avatar_changes_saved', $editProfileFilterArray['avatarChangesSaved']);
571
- echo $editProfileFilterArray['avatarChangesSaved'];
572
  unset($_GET['fileType']);
 
573
  }elseif ($_GET['fileType'] == 'attachment'){
574
- $editProfileFilterArray['attachmentChangesSaved'] = '
575
- <p class="changes-saved">'.
576
- __('The attachment', 'profilebuilder') .' "'. $_GET['fileName'] .'" '. __('was successfully deleted.', 'profilebuilder') .'
577
- </p><!-- .changes-saved -->';
578
- $editProfileFilterArray['attachmentChangesSaved'] = apply_filters('wppb_edit_profile_attachment_changes_saved', $editProfileFilterArray['attachmentChangesSaved']);
579
- echo $editProfileFilterArray['attachmentChangesSaved'];
580
  unset($_GET['fileType']);
581
  unset($_GET['fileName']);
582
  }
583
  }
584
 
585
  /* all the other messages/errors */
586
- $nrOfBadUploads = 0;
587
- $nrOfBadUploads = count($uploadName);
588
- $nrOfBadExtUploads = count($uploadExt);
589
  if (($changesSaved == 'yes') && ($changesSavedNoMatchingPass == 'no') && ($changesSavedNoPass == 'no') && ($changesSavedNoEmail == 'no') && ($changesSavedNoEmailExist == 'no') && ($avatarUpload == 'yes') && ($nrOfBadUploads == 0) && ($nrOfBadExtUploads == 0)){
590
  $editProfileFilterArray['allChangesSaved'] = '
591
  <p class="changes-saved">'. __('The changes have been successfully saved.', 'profilebuilder') .'</p><!-- .changes-saved -->';
592
- $editProfileFilterArray['allChangesSaved'] = apply_filters('wppb_edit_profile_all_changes_saved', $editProfileFilterArray['allChangesSaved']);
593
- echo $editProfileFilterArray['allChangesSaved'];
594
- }
595
- elseif (($changesSaved == 'yes') && ($changesSavedNoEmailExist == 'yes') && ($previousError == 'no')){
596
  $editProfileFilterArray['allChangesSavedExceptExistingEmail'] = '
597
  <p class="semi-saved"> '.
598
  __('The email address you entered is already registered to a different user.', 'profilebuilder') .'<br/>'. __('The email address was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
599
  </p>';
600
- $editProfileFilterArray['allChangesSavedExceptExistingEmail'] = apply_filters('wppb_edit_profile_all_changes_saved_except_existing_email', $editProfileFilterArray['allChangesSavedExceptExistingEmail']);
601
- echo $editProfileFilterArray['allChangesSavedExceptExistingEmail'];
602
  $previousError = 'yes';
603
- }
604
-
605
- elseif (($changesSaved == 'yes') && ($changesSavedNoEmail == 'yes') && ($previousError == 'no')){
606
  $editProfileFilterArray['allChangesSavedExceptInvalidEmail'] = '
607
  <p class="semi-saved"> '.
608
  __('The email address you entered is invalid.', 'profilebuilder') .'<br/>'. __('The email address was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
609
  </p>';
610
- $editProfileFilterArray['allChangesSavedExceptInvalidEmail'] = apply_filters('wppb_edit_profile_all_changes_saved_except_invalid_email', $editProfileFilterArray['allChangesSavedExceptInvalidEmail']);
611
- echo $editProfileFilterArray['allChangesSavedExceptInvalidEmail'];
612
  $previousError = 'yes';
613
- }
614
- elseif (($changesSaved == 'yes') && ($changesSavedNoMatchingPass == 'yes') && ($previousError == 'no')){
615
  $editProfileFilterArray['allChangesSavedMismatchedPass'] = '
616
  <p class="semi-saved">'.
617
  __('The passwords you entered do not match.', 'profilebuilder') .'<br/>'. __('The password was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
618
  </p>';
619
- $editProfileFilterArray['allChangesSavedMismatchedPass'] = apply_filters('wppb_edit_profile_all_changes_saved_except_mismatch_password', $editProfileFilterArray['allChangesSavedMismatchedPass']);
620
- echo $editProfileFilterArray['allChangesSavedMismatchedPass'];
621
  $previousError = 'yes';
622
- }
623
- elseif (($changesSaved == 'yes') && ($changesSavedNoPass == 'yes') && ($previousError == 'no')){
624
  $editProfileFilterArray['allChangesSavedUncompletedPass'] = '
625
  <p class="semi-saved">'.
626
  __('You didn\'t complete both password fields.', 'profilebuilder') .'<br/>'. __('The password was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
627
  </p>';
628
- $editProfileFilterArray['allChangesSavedUncompletedPass'] = apply_filters('wppb_edit_profile_all_changes_saved_except_uncompleted_password', $editProfileFilterArray['allChangesSavedUncompletedPass']);
629
- echo $editProfileFilterArray['allChangesSavedUncompletedPass'];
630
  $previousError = 'yes';
631
- }
632
- elseif ($allRequiredCompleted == 'no'){
633
  $editProfileFilterArray['errorSavingChanges'] = '<p class="error">'.$errorMessage.'<br/>'. __('Your profile was NOT updated!', 'profilebuilder').'</p><!-- .error -->';
634
- $editProfileFilterArray['errorSavingChanges'] = apply_filters('wppb_edit_profile_error_saving_changes', $editProfileFilterArray['errorSavingChanges']);
635
- echo $editProfileFilterArray['errorSavingChanges'];
636
  }
637
- $wppb_premium = WPPB_PLUGIN_DIR . '/premium/functions/';
638
- if (file_exists ( $wppb_premium.'extra.fields.php' )){
639
- if (($changesSaved == 'yes') && ($nrOfBadUploads > 0) && ($previousError == 'no')){
640
- $lastOne = 0;
641
- $editProfileFilterArray['errorUploadingAttachments'] = '
642
- <p class="semi-saved">'. __('There was an error while trying to upload the following attachments:', 'profilebuilder') .'<br/>
643
- <span class="error">';
644
- foreach ($uploadName as $key => $name){
645
- $lastOne++;
646
- $editProfileFilterArray['errorUploadingAttachments'] .= $name;
647
- if ($nrOfBadUploads-$lastOne > 0)
648
- $editProfileFilterArray['errorUploadingAttachments'] .= ';<span style="padding-left:10px"></span>';
649
- }
650
- $editProfileFilterArray['errorUploadingAttachments'] .= '
651
- </span><br/>'.
652
- __('Possible cause: the size was bigger than', 'profilebuilder') .' '.WPPB_SERVER_MAX_UPLOAD_SIZE_MEGA.'b.<br/>'. __('The listed attachements were', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
653
- </p>';
654
- $editProfileFilterArray['errorUploadingAttachments'] = apply_filters('wppb_edit_profile_error_uploading_attachments', $editProfileFilterArray['errorUploadingAttachments']);
655
- echo $editProfileFilterArray['errorUploadingAttachments'];
656
- $previousError = 'yes';
657
- }if (($changesSaved == 'yes') && ($avatarUpload == 'no') && ($previousError == 'no')){
658
- $editProfileFilterArray['errorUploadingAvatar'] = '
659
- <p class="semi-saved">'.
660
- __('There was an error while trying to upload your avatar picture.', 'profilebuilder') .'<br/>'. __('Possible cause: size/incorrect file-type.', 'profilebuilder') .'<br/>'. __('The avatar was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
661
- </p>';
662
- $editProfileFilterArray['errorUploadingAvatar'] = apply_filters('wppb_edit_profile_error_uploading_avatar', $editProfileFilterArray['errorUploadingAvatar']);
663
- echo $editProfileFilterArray['errorUploadingAvatar'];
664
- $previousError = 'yes';
665
- }elseif (($changesSaved == 'yes') && ($nrOfBadExtUploads != 0) && ($previousError == 'no')){
666
- $editProfileFilterArray['errorUploadingAttachmentExts'] = '
667
- <p class="semi-saved">'.
668
- __('There was an error while trying to upload the following attachment(s)', 'profilebuilder') .': <span class="error">';
669
- foreach ($uploadExt as $key5 => $name5){
670
  $lastOne++;
671
- $editProfileFilterArray['errorUploadingAttachmentExts'] .= $name5;
672
- if ($nrOfBadExtUploads-$lastOne > 0)
673
- $editProfileFilterArray['errorUploadingAttachmentExts'] .= ';<span style="padding-left:10px"></span>';
674
  }
675
- $editProfileFilterArray['errorUploadingAttachmentExts'] .= '</span><br/>'. __('Only files with the following extension(s) can be uploaded:', 'profilebuilder') .' <span class="error">'.$allowedExtensions.'</span><br/>'. __('This file was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
676
- </p>';
677
- $editProfileFilterArray['errorUploadingAttachmentExts'] = apply_filters('wppb_edit_profile_error_uploading_attachment', $editProfileFilterArray['errorUploadingAttachmentExts']);
678
- echo $editProfileFilterArray['errorUploadingAttachmentExts'];
679
- $previousError = 'yes';
680
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
681
  }
682
- }
683
-
684
- /* use this action hook to add extra content before the edit profile form. */
685
- do_action( 'wppb_before_edit_profile_fields' );
 
686
  ?>
687
 
688
- <form enctype="multipart/form-data" method="post" id="edituser" class="user-forms" action="<?php the_permalink(); ?>">
689
  <?php
690
- echo '<input type="hidden" name="MAX_FILE_SIZE" value="'.WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE.'" /><!-- set the MAX_FILE_SIZE to the server\'s current max upload size in bytes -->';
 
 
 
691
 
692
- $editProfileFilterArray2['contentName1'] = '<p class="nameHeader"><strong>'. __('Name', 'profilebuilder') .'</strong></p>';
693
- $editProfileFilterArray2['contentName1'] = apply_filters('wppb_edit_profile_content_name1', $editProfileFilterArray2['contentName1']);
694
-
695
- if ($wppb_defaultOptions['username'] == 'show'){
696
- $editProfileFilterArray2['contentName2'] = '
697
- <p class="username">
698
- <label for="user_login">'. __('Username', 'profilebuilder') .'</label>
699
- <input class="text-input" name="user_login" type="text" id="user_login" value="'. get_the_author_meta( 'user_login', $current_user->id ) .'" disabled="disabled"/> <span class="wppb-description-delimiter"> '. __('Usernames cannot be changed.', 'profilebuilder') .'</span>
700
- </p><!-- .first_name -->';
701
- $editProfileFilterArray2['contentName2'] = apply_filters('wppb_edit_profile_content_name2', $editProfileFilterArray2['contentName2'], $current_user->id);
702
- }
703
 
704
- if ($wppb_defaultOptions['firstname'] == 'show'){
705
- $errorVar = '';
706
- $errorMark = '';
707
- if ($wppb_defaultOptions['firstnameRequired'] == 'yes'){
708
- $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
709
- if (isset($_POST['first_name'])){
710
- if (trim($_POST['first_name']) == ''){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
711
  $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
712
  $errorVar = ' errorHolder';
713
  }
714
- }
 
 
 
 
 
 
715
  }
716
- $editProfileFilterArray2['contentName3'] = '
717
- <p class="first_name'.$errorVar.'">
718
- <label for="first_name">'. __('First Name', 'profilebuilder') .$errorMark.'</label>
719
- <input class="text-input" name="first_name" type="text" id="first_name" value="'. get_the_author_meta( 'first_name', $current_user->id ) .'" />
720
- </p><!-- .first_name -->';
721
- $editProfileFilterArray2['contentName3'] = apply_filters('wppb_edit_profile_content_name3', $editProfileFilterArray2['contentName3'], $current_user->id, $errorVar, $errorMark);
722
- }
723
-
724
- if ($wppb_defaultOptions['lastname'] == 'show'){
725
- $errorVar = '';
726
- $errorMark = '';
727
- if ($wppb_defaultOptions['lastnameRequired'] == 'yes'){
728
- $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
729
- if (isset($_POST['last_name'])){
730
- if (trim($_POST['last_name']) == ''){
731
  $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
732
  $errorVar = ' errorHolder';
733
  }
734
- }
735
- }
736
- $editProfileFilterArray2['contentName4'] = '
737
- <p class="last_name'.$errorVar.'">
738
- <label for="last_name">'. __('Last Name', 'profilebuilder') .$errorMark.'</label>
739
- <input class="text-input" name="last_name" type="text" id="last_name" value="'. get_the_author_meta( 'last_name', $current_user->id ) .'" />
740
- </p><!-- .last_name -->';
741
- $editProfileFilterArray2['contentName4'] = apply_filters('wppb_edit_profile_content_name4', $editProfileFilterArray2['contentName4'], $current_user->id);
742
- }
743
-
744
- if ($wppb_defaultOptions['nickname'] == 'show'){
745
- $errorVar = '';
746
- $errorMark = '';
747
- if ($wppb_defaultOptions['nicknameRequired'] == 'yes'){
748
- $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
749
- if (isset($_POST['nickname'])){
750
- if (trim($_POST['nickname']) == ''){
751
  $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
752
  $errorVar = ' errorHolder';
753
  }
754
- }
755
- }
756
- $editProfileFilterArray2['contentName5'] = '
757
- <p class="nickname'.$errorVar.'">
758
- <label for="nickname">'. __('Nickname', 'profilebuilder') .$errorMark.'</label>
759
- <input class="text-input" name="nickname" type="text" id="nickname" value="'. get_the_author_meta( 'nickname', $current_user->id ) .'" />
760
- </p><!-- .nickname -->';
761
- $editProfileFilterArray2['contentName5'] = apply_filters('wppb_edit_profile_content_name5', $editProfileFilterArray2['contentName5'], $current_user->id, $errorVar, $errorMark);
762
- }
763
-
764
- if ($wppb_defaultOptions['dispname'] == 'show'){
765
- $errorVar = '';
766
- $errorMark = '';
767
- if ($wppb_defaultOptions['dispnameRequired'] == 'yes'){
768
- $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
769
- if (isset($_POST['display_name'])){
770
- if (trim($_POST['display_name']) == ''){
771
  $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
772
  $errorVar = ' errorHolder';
773
  }
774
- }
775
- }
776
-
777
- $editProfileFilterArray2['displayName'] = '
778
- <p class="display_name'.$errorVar.'">
779
- <label for="display_name">'. __('Display name publicly as', 'profilebuilder') .$errorMark.'</label>
780
- <select name="display_name" id="display_name">';
781
- $public_display = array();
782
- $public_display['display_username'] = get_the_author_meta('user_login', $current_user->id);
783
- $thisFirstName = get_the_author_meta('first_name', $current_user->id);
784
- if ( !empty($thisFirstName))
785
- $public_display['display_firstname'] = get_the_author_meta('first_name', $current_user->id);
786
- $thisLastName = get_the_author_meta('last_name', $current_user->id);
787
- if ( !empty($thisLastName))
788
- $public_display['display_lastname'] = get_the_author_meta('last_name', $current_user->id);
789
- $public_display['display_nickname'] = get_the_author_meta('nickname', $current_user->id);
790
- if ( !empty($thisFirstName) && !empty($thisLastName) ) {
791
- $public_display['display_firstlast'] = $thisFirstName . ' ' . $thisLastName;
792
- $public_display['display_lastfirst'] = $thisLastName . ' ' . $thisFirstName;
793
- }
794
- $thisDisplayName = get_the_author_meta('display_name', $current_user->id);
795
- if ( !in_array( $thisDisplayName, $public_display ) ) // Only add this if it isn't duplicated elsewhere
796
- $public_display = array( 'display_displayname' => $thisDisplayName ) + $public_display;
797
- $public_display = array_map( 'trim', $public_display );
798
- foreach ( $public_display as $id => $item ) {
799
- $editProfileFilterArray2['displayName'] .= '<option id="'.$id.'" value="'.$item.'"';
800
- if ($thisDisplayName == $item)
801
- $editProfileFilterArray2['displayName'] .= ' selected';
802
- $editProfileFilterArray2['displayName'] .= '>'.$item.'</option>';
803
- }
804
- $editProfileFilterArray2['displayName'] .= '
805
- </select>
806
- </p><!-- .display_name -->';
807
 
808
- $editProfileFilterArray2['displayName'] = apply_filters('wppb_edit_profile_display_name', $editProfileFilterArray2['displayName'], $current_user->id, $errorVar, $errorMark);
809
- }
810
-
811
- $editProfileFilterArray2['contentInfo1'] = '<p class="contactInfoHeader"><strong>'. __('Contact Info', 'profilebuilder') .'</strong></p>';
812
- $editProfileFilterArray2['contentInfo1'] = apply_filters('wppb_edit_profile_content_info1', $editProfileFilterArray2['contentInfo1']);
813
-
814
- if ($wppb_defaultOptions['email'] == 'show'){
815
- $errorVar = '';
816
- $errorMark = '';
817
- if ($wppb_defaultOptions['emailRequired'] == 'yes'){
818
- $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
819
- if (isset($_POST['email'])){
820
- if (trim($_POST['email']) == ''){
821
  $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
822
  $errorVar = ' errorHolder';
823
  }
824
- }
825
- }
826
- $editProfileFilterArray2['contentInfo2'] = '
827
- <p class="form-email'.$errorVar.'">
828
- <label for="email">'. __('E-mail', 'profilebuilder') .$errorMark.'</label>
829
- <input class="text-input" name="email" type="text" id="email" value="'. get_the_author_meta( 'user_email', $current_user->id ) .'" />
830
- <span class="wppb-description-delimiter">'. __('(required)', 'profilebuilder') .'</span>
831
- </p><!-- .form-email -->';
832
- $editProfileFilterArray2['contentInfo2'] = apply_filters('wppb_edit_profile_content_info2', $editProfileFilterArray2['contentInfo2'], $current_user->id, $errorVar, $errorMark);
833
- }
834
 
835
- if ($wppb_defaultOptions['website'] == 'show'){
836
- $errorVar = '';
837
- $errorMark = '';
838
- if ($wppb_defaultOptions['websiteRequired'] == 'yes'){
839
- $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
840
- if ((trim($_POST['website']) == '') && isset($_POST['website'])){
841
- $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
842
- $errorVar = ' errorHolder';
843
- }
844
- }
845
- $editProfileFilterArray2['contentInfo3'] = '
846
- <p class="form-website'.$errorVar.'">
847
- <label for="website">'. __('Website', 'profilebuilder') .$errorMark.'</label>
848
- <input class="text-input" name="website" type="text" id="website" value="'. get_the_author_meta( 'user_url', $current_user->id ) .'" />
849
- </p><!-- .form-website -->';
850
- $editProfileFilterArray2['contentInfo3'] = apply_filters('wppb_edit_profile_content_info3', $editProfileFilterArray2['contentInfo3'], $current_user->id, $errorVar, $errorMark);
851
- }
852
 
853
- if ($wppb_defaultOptions['aim'] == 'show'){
854
- $errorVar = '';
855
- $errorMark = '';
856
- if ($wppb_defaultOptions['aimRequired'] == 'yes'){
857
- $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
858
- if ((trim($_POST['aim']) == '') && isset($_POST['aim'])){
859
- $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
860
- $errorVar = ' errorHolder';
861
- }
862
- }
863
- $editProfileFilterArray2['contentInfo4'] = '
864
- <p class="form-aim'.$errorVar.'">
865
- <label for="aim">'. __('AIM', 'profilebuilder') .'</label>
866
- <input class="text-input" name="aim" type="text" id="aim" value="'. get_the_author_meta( 'aim', $current_user->id ) .'" />
867
- </p><!-- .form-aim -->';
868
- $editProfileFilterArray2['contentInfo4'] = apply_filters('wppb_edit_profile_content_info4', $editProfileFilterArray2['contentInfo4'], $current_user->id, $errorVar, $errorMark);
869
- }
870
-
871
- if ($wppb_defaultOptions['yahoo'] == 'show'){
872
- $errorVar = '';
873
- $errorMark = '';
874
- if ($wppb_defaultOptions['yahooRequired'] == 'yes'){
875
- $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
876
- if ((trim($_POST['yim']) == '') && isset($_POST['yim'])){
877
- $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
878
- $errorVar = ' errorHolder';
879
- }
880
- }
881
- $editProfileFilterArray2['contentInfo5'] = '
882
- <p class="form-yim'.$errorVar.'">
883
- <label for="yim">'. __('Yahoo IM', 'profilebuilder') .$errorMark.'</label>
884
- <input class="text-input" name="yim" type="text" id="yim" value="'. get_the_author_meta( 'yim', $current_user->id ) .'" />
885
- </p><!-- .form-yim -->';
886
- $editProfileFilterArray2['contentInfo5'] = apply_filters('wppb_edit_profile_content_info5', $editProfileFilterArray2['contentInfo5'], $current_user->id, $errorVar, $errorMark);
887
- }
888
-
889
- if ($wppb_defaultOptions['jabber'] == 'show'){
890
- $errorVar = '';
891
- $errorMark = '';
892
- if ($wppb_defaultOptions['jabberRequired'] == 'yes'){
893
- $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
894
- if ((trim($_POST['jabber']) == '') && isset($_POST['jabber'])){
895
- $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
896
- $errorVar = ' errorHolder';
897
- }
898
- }
899
- $editProfileFilterArray2['contentInfo6'] = '
900
- <p class="form-jabber'.$errorVar.'">
901
- <label for="jabber">'. __('Jabber / Google Talk', 'profilebuilder') .$errorMark.'</label>
902
- <input class="text-input" name="jabber" type="text" id="jabber" value="'. get_the_author_meta( 'jabber', $current_user->id ) .'" />
903
- </p><!-- .form-jabber -->';
904
- $editProfileFilterArray2['contentInfo6'] = apply_filters('wppb_edit_profile_content_info6', $editProfileFilterArray2['contentInfo6'], $current_user->id, $errorVar, $errorMark);
905
- }
906
-
907
- $editProfileFilterArray2['aboutYourself1'] = '<p class="aboutYourselfHeader"><strong>'. __('About Yourself', 'profilebuilder') .'</strong></p>';
908
- $editProfileFilterArray2['aboutYourself1'] = apply_filters('wppb_edit_profile_content_about_yourself1', $editProfileFilterArray2['aboutYourself1']);
909
-
910
- if ($wppb_defaultOptions['bio'] == 'show'){
911
- $errorVar = '';
912
- $errorMark = '';
913
- if ($wppb_defaultOptions['bioRequired'] == 'yes'){
914
- $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
915
- if ((trim($_POST['description']) == '') && isset($_POST['description'])){
916
- $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
917
- $errorVar = ' errorHolder';
918
- }
919
- }
920
- $editProfileFilterArray2['aboutYourself2'] = '
921
- <p class="form-description'.$errorVar.'">
922
- <label for="description">'. __('Biographical Info', 'profilebuilder') .$errorMark.'</label>
923
- <textarea class="text-input" name="description" id="description" rows="5" cols="30">'. get_the_author_meta( 'description', $current_user->id ) .'</textarea>
924
- </p><!-- .form-description -->';
925
- $editProfileFilterArray2['aboutYourself2'] = apply_filters('wppb_edit_profile_content_about_yourself2', $editProfileFilterArray2['aboutYourself2'], $current_user->id, $errorVar, $errorMark);
926
- }
927
-
928
- if ($wppb_defaultOptions['password'] == 'show'){
929
-
930
- $editProfileFilterArray2['aboutYourself3'] = '
931
- <p class="form-password">
932
- <label for="pass1">'. __('New Password', 'profilebuilder') .'</label>
933
- <input class="text-input" name="pass1" type="password" id="pass1" />
934
- </p><!-- .form-password -->
935
 
936
- <p class="form-password'.$errorVar.'">
937
- <label for="pass2">'. __('Repeat Password', 'profilebuilder') .$errorMark.'</label>
938
- <input class="text-input" name="pass2" type="password" id="pass2" />
939
- </p><!-- .form-password -->';
940
- $editProfileFilterArray2['aboutYourself3'] = apply_filters('wppb_edit_profile_content_about_yourself3', $editProfileFilterArray2['aboutYourself3'], $errorVar, $errorMark);
941
- }
 
 
 
 
 
942
 
943
-
944
- $wppb_premium = WPPB_PLUGIN_DIR . '/premium/functions/';
945
- if (file_exists ( $wppb_premium.'extra.fields.php' )){
946
- require_once($wppb_premium.'extra.fields.php');
947
 
948
- $page = 'edit_profile';
949
- $returnedValue = wppb_extra_fields($current_user->id, $extraFieldsErrorHolder, $editProfileFilterArray2, $page, $error, $_POST);
950
 
951
- //copy over extra fields to the rest of the fieldso on the edit profile
952
- foreach($returnedValue as $key => $value)
953
- $editProfileFilterArray2[$key] = $value;
954
- }
955
-
956
- /* additional filter, just in case it is needed */
957
- $editProfileFilterArray2['extraEditProfileFilter'] = '';
958
- $editProfileFilterArray2['extraEditProfileFilter'] = apply_filters('extraEditProfileFilter', $editProfileFilterArray2['extraEditProfileFilter']);
959
- /* END additional filter, just in case it is needed */
960
-
961
-
962
- $editProfileFilterArray2 = apply_filters('wppb_edit_profile', $editProfileFilterArray2);
963
- foreach ($editProfileFilterArray2 as $key => $value)
964
- echo $value;
965
  ?>
966
 
967
- <p class="form-submit">
968
- <input name="updateuser" type="submit" id="updateuser" class="submit button" value="<?php _e('Update', 'profilebuilder'); ?>" />
969
- <?php// wp_nonce_field( 'update-user' ) ?>
970
- <input name="action" type="hidden" id="action" value="update-user" />
971
- </p><!-- .form-submit -->
972
- <?php wp_nonce_field('verify_edit_user','edit_nonce_field'); ?>
973
- </form><!-- #edituser -->
974
 
975
- <?php endif; ?>
976
- <?php /* use this action hook to add extra content after the edit profile form. */ ?>
977
- <?php do_action( 'wppb_after_edit_profile_fields' ); ?>
 
 
 
978
 
979
  </div>
980
 
80
 
81
  //fallback if the file was largen then post_max_size, case in which no errors can be saved in $_FILES[fileName]['error']
82
  if (empty($_FILES) && empty($_POST) && isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) == 'post') {
83
+ $editProfileFilterArray['noPost'] = '<p class="error">' . sprintf(__( 'The information size you were trying to submit was larger than %1$sb!<br/>This is usually caused by a large file(s) trying to be uploaded.<br/>Since it was also larger than %2$sb no additional information is available.<br/>The user was NOT created!', 'profilebuilder'), WPPB_SERVER_MAX_UPLOAD_SIZE_MEGA, WPPB_SERVER_MAX_POST_SIZE_MEGA) . '</p>';
84
+ echo $editProfileFilterArray['noPost'] = apply_filters('wppb_edit_profile_no_post_error', $editProfileFilterArray['noPost']);
 
 
 
 
 
 
85
  }
86
+
87
  // a way to catch the user before updating his/her profile without completing a required field
88
  if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'update-user' && wp_verify_nonce($_POST['edit_nonce_field'],'verify_edit_user') ) {
89
  //variable to control whether the user submitted data or not
267
  }
268
 
269
  /* update the extra profile information */
270
+ $wppb_premium = WPPB_PLUGIN_DIR . '/premium/functions/';
271
+ if (file_exists ( $wppb_premium.'extra.fields.php' )){
272
+ $wppbFetchArray = get_option('wppb_custom_fields');
273
+ foreach ( $wppbFetchArray as $key => $value){
274
+ switch ($value['item_type']) {
275
+ case "input":{
276
+ $_POST[$value['item_type'].$value['id']] = apply_filters('wppb_edit_profile_input_custom_field_'.$value['id'], $_POST[$value['item_type'].$value['id']]);
277
+ if (isset($value['item_required'])){
278
+ if ($value['item_required'] == 'yes'){
279
+ if (trim($_POST[$value['item_type'].$value['id']]) != '')
 
 
 
 
280
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
281
+ else
282
+ array_push($extraFieldsErrorHolder, $value['id']);
283
  }else
284
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
285
+ }else
 
 
 
286
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
287
 
288
+ break;
289
+ }
290
+ case "hiddenInput":{
291
+ update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
292
+
293
+ break;
294
+ }
295
+ case "checkbox":{
296
+ $checkboxOption = '';
297
+ $checkboxValue = explode(',', $value['item_options']);
298
+ foreach($checkboxValue as $thisValue){
299
+ $thisValue = str_replace(' ', '#@space@#', $thisValue); //we need to escape the space-codification we sent earlier in the post
300
+ if (isset($_POST[$thisValue.$value['id']])){
301
+ $localValue = str_replace('#@space@#', ' ', $_POST[$thisValue.$value['id']]);
302
+ $checkboxOption = $checkboxOption.$localValue.',';
303
  }
304
+ }
305
+
306
+ if (isset($value['item_required'])){
307
+ if ($value['item_required'] == 'yes'){
308
+ if (trim($checkboxOption) != '')
 
 
 
309
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $checkboxOption ) );
310
+ else
311
+ array_push($extraFieldsErrorHolder, $value['id']);
312
  }else
313
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $checkboxOption ) );
314
+ }else
315
+ update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $checkboxOption ) );
316
+
317
+ break;
318
+ }
319
+ case "radio":{
320
+ if (isset($value['item_required'])){
321
+ if ($value['item_required'] == 'yes'){
322
+ if (trim($_POST[$value['item_type'].$value['id']]) != '')
 
 
323
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
324
+ else
325
+ array_push($extraFieldsErrorHolder, $value['id']);
326
  }else
327
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
328
+ }else
329
+ update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
330
+ break;
331
+ }
332
+ case "select":{
333
+ if (isset($value['item_required'])){
334
+ if ($value['item_required'] == 'yes'){
335
+ if (trim($_POST[$value['item_type'].$value['id']]) != '')
 
 
336
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
337
+ else
338
+ array_push($extraFieldsErrorHolder, $value['id']);
339
  }else
340
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
341
+ }else
342
+ update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
343
+ break;
344
+ }
345
+ case "countrySelect":{
346
+ if (isset($value['item_required'])){
347
+ if ($value['item_required'] == 'yes'){
348
+ if (trim($_POST[$value['item_type'].$value['id']]) != '')
 
 
349
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
350
+ else
351
+ array_push($extraFieldsErrorHolder, $value['id']);
352
  }else
353
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
354
+ }else
355
+ update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
356
+
357
+ break;
358
+ }
359
+ case "timeZone":{
360
+ if (isset($value['item_required'])){
361
+ if ($value['item_required'] == 'yes'){
362
+ if (trim($_POST[$value['item_type'].$value['id']]) != '')
 
 
363
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
364
+ else
365
+ array_push($extraFieldsErrorHolder, $value['id']);
366
  }else
367
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
368
+ }else
369
+ update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
370
+
371
+ break;
372
+ }
373
+ case "datepicker":{
374
+ if (isset($value['item_required'])){
375
+ if ($value['item_required'] == 'yes'){
376
+ if (trim($_POST[$value['item_type'].$value['id']]) != '')
 
 
377
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
378
+ else
379
+ array_push($extraFieldsErrorHolder, $value['id']);
380
  }else
381
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
382
+ }else
383
+ update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
384
+
385
+ break;
386
+ }
387
+ case "textarea":{
388
+ if (isset($value['item_required'])){
389
+ if ($value['item_required'] == 'yes'){
390
+ if (trim($_POST[$value['item_type'].$value['id']]) != '')
 
 
391
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
392
+ else
393
+ array_push($extraFieldsErrorHolder, $value['id']);
394
  }else
395
  update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
396
+ }else
397
+ update_user_meta( $current_user->id, $value['item_metaName'], esc_attr( $_POST[$value['item_type'].$value['id']] ) );
398
+
399
+ break;
400
+ }
401
+ case "upload":{
402
+ $uploadedfile = $value['item_type'].$value['id'];
403
+
404
+ //get allowed file types
405
+ if (($value['item_options'] != NULL) || ($value['item_options'] != '')){
406
+ $allFiles = false;
407
+ $extensions = explode(',', $value['item_options']);
408
+ foreach($extensions as $key3 => $value3)
409
+ $extensions[$key3] = trim($value3);
410
+ }else
411
+ $allFiles = true;
412
+ //first we need to verify if we don't try to upload a 0b or 0 length file
413
+ if ( (basename( $_FILES[$uploadedfile]['name']) != '')){
414
+ //get this attachments extension
415
+ $thisFileExtStart = strrpos($_FILES[$uploadedfile]['name'], '.');
416
+ $thisFileExt = substr($_FILES[$uploadedfile]['name'], $thisFileExtStart);
417
 
418
+ if ($allFiles === false){
419
+ if (in_array($thisFileExt, $extensions)){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
420
  //second we need to verify if the uploaded file size is less then the set file size in php.ini
421
  if (($_FILES[$uploadedfile]['size'] < WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE) && ($_FILES[$uploadedfile]['size'] !=0)){
422
  //we need to prepare the basename of the file, so that ' becomes ` as ' gives an error
446
  //insert the name of the file in an array so that in case an error comes up, we know which files we just uploaded
447
  array_push($uploadName, basename( $_FILES[$uploadedfile]['name']));
448
  }
449
+ }else{
450
+ array_push($uploadExt, basename( $_FILES[$uploadedfile]['name']));
451
+ $allowedExtensions = '';
452
+ (int)$nrOfExt = count($extensions)-2;
453
+ foreach($extensions as $key4 => $value4){
454
+ $allowedExtensions .= $value4;
455
+ if ($key4 <= $nrOfExt)
456
+ $allowedExtensions .= ', ';
457
+
458
+ }
459
  }
460
+ }else{
461
+ //second we need to verify if the uploaded file size is less then the set file size in php.ini
462
+ if (($_FILES[$uploadedfile]['size'] < WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE) && ($_FILES[$uploadedfile]['size'] !=0)){
463
+ //we need to prepare the basename of the file, so that ' becomes ` as ' gives an error
464
+ $fileName = basename( $_FILES[$uploadedfile]['name']);
465
+ $finalFileName = '';
 
 
 
 
466
 
467
+ for ($i=0; $i < strlen($fileName); $i++){
468
+ if ($fileName[$i] == "'")
469
+ $finalFileName .= '`';
470
+ else $finalFileName .= $fileName[$i];
471
+ }
472
+
473
+ //create the target path for uploading
474
+ $wpUploadPath = wp_upload_dir(); // Array of key => value pairs
475
+ $target_path = $wpUploadPath['basedir']."/profile_builder/attachments/";
476
+ $target_path = $target_path . 'userID_'.$current_user->id.'_attachment_'. $finalFileName;
477
+
478
+ if (move_uploaded_file($_FILES[$uploadedfile]['tmp_name'], $target_path)){
479
+ $upFile = $wpUploadPath['baseurl'].'/profile_builder/attachments/userID_'.$current_user->id.'_attachment_'. $finalFileName;
480
+ update_user_meta( $current_user->id, $value['item_metaName'], $upFile);
481
+ $pictureUpload = 'yes';
482
+ }else{
483
+ //insert the name of the file in an array so that in case an error comes up, we know which files we just uploaded
484
+ array_push($uploadName, basename( $_FILES[$uploadedfile]['name']));
485
+ }
486
+ }else{
487
+ //insert the name of the file in an array so that in case an error comes up, we know which files we just uploaded
488
+ array_push($uploadName, basename( $_FILES[$uploadedfile]['name']));
489
+ }
490
  }
491
+ }
492
+ break;
493
+ }
494
+ case "avatar":{
495
+ $avatarUpload = 'no';
496
+ $uploadedfile = $value['item_type'].$value['id'];
497
+ $wpUploadPath = wp_upload_dir(); // Array of key => value pairs
498
+ $target_path_original = $wpUploadPath['basedir']."/profile_builder/avatars/";
499
+ $fileName = $_FILES[$uploadedfile]['name'];
500
+ $finalFileName = '';
501
+
502
+ for ($i=0; $i < strlen($fileName); $i++){
503
+ if ($fileName[$i] == "'")
504
+ $finalFileName .= '`';
505
+ elseif ($fileName[$i] == ' ')
506
+ $finalFileName .= '_';
507
+ else $finalFileName .= $fileName[$i];
508
+ }
509
+
510
+ $fileName = $finalFileName;
511
 
512
+ $target_path = $target_path_original . 'userID_'.$current_user->id.'_originalAvatar_'. $fileName;
513
 
514
+ /* when trying to upload file, be sure it's one of the accepted image file-types */
515
+ if ( (($_FILES[$uploadedfile]['type'] == 'image/jpeg') || ($_FILES[$uploadedfile]['type'] == 'image/jpg') || ($_FILES[$uploadedfile]['type'] == 'image/png') || ($_FILES[$uploadedfile]['type'] == 'image/bmp') || ($_FILES[$uploadedfile]['type'] == 'image/pjpeg') || ($_FILES[$uploadedfile]['type'] == 'image/x-png')) && (($_FILES[$uploadedfile]['size'] < WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE) && ($_FILES[$uploadedfile]['size'] !=0)) ){
516
+ $avatarUpload = 'yes';
517
+ $wp_filetype = wp_check_filetype(basename( $_FILES[$uploadedfile]['name']), null );
518
+ $attachment = array(
519
+ 'post_mime_type' => $wp_filetype['type'],
520
+ 'post_title' => $fileName,
521
+ 'post_content' => '',
522
+ 'post_status' => 'inherit'
523
+ );
524
 
525
 
526
+ $attach_id = wp_insert_attachment( $attachment, $target_path);
527
+
528
+ $upFile = image_downsize( $attach_id, 'thumbnail' );
529
+ $upFile = $upFile[0];
530
+
531
+ //if file upload succeded
532
+ if (move_uploaded_file($_FILES[$uploadedfile]['tmp_name'], $target_path)){
533
+ update_user_meta( $current_user->id, $value['item_metaName'], $upFile);
534
+ update_user_meta( $current_user->id, 'resized_avatar_'.$value['id'], '');
535
 
536
+ }else $avatarUpload = 'no';
537
+ }elseif ( (($_FILES[$uploadedfile]['size'] > WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE) || ($_FILES[$uploadedfile]['size'] == 0)) && ($fileName != '') )
538
+ $avatarUpload = 'no';
539
+ elseif ($fileName == '')
540
+ $avatarUpload = 'yes';
541
+ break;
 
542
  }
543
  }
544
  }
545
+ }
546
 
547
  }
548
 
549
  ?>
550
  <div class="wppb_holder" id="wppb_modify">
551
  <?php
552
+ if ( !is_user_logged_in() ){
553
  $editProfileFilterArray['notLoggedIn'] = '
554
  <p class="warning">'. __('You must be logged in to edit your profile.', 'profilebuilder') .'</p><!-- .warning -->';
555
+ echo $editProfileFilterArray['notLoggedIn'] = apply_filters('wppb_edit_profile_user_not_logged_in', $editProfileFilterArray['notLoggedIn']);
 
556
 
557
+ }else{
 
558
  /* messages for the the delete avatar/attachment */
559
  if (isset($_GET['fileType'])){
560
  if ($_GET['fileType'] == 'avatar'){
561
  $editProfileFilterArray['avatarChangesSaved'] = '
562
  <p class="changes-saved">'. __('The avatar was successfully deleted.', 'profilebuilder') .'</p><!-- .changes-saved -->';
563
+ echo $editProfileFilterArray['avatarChangesSaved'] = apply_filters('wppb_edit_profile_avatar_changes_saved', $editProfileFilterArray['avatarChangesSaved']);
 
564
  unset($_GET['fileType']);
565
+
566
  }elseif ($_GET['fileType'] == 'attachment'){
567
+ $editProfileFilterArray['attachmentChangesSaved'] = '<p class="changes-saved">' . sprintf(__( 'The attachment "%1$s" was successfully deleted.', 'profilebuilder'), $_GET['fileName']) . '</p><!-- .changes-saved -->';
568
+ echo $editProfileFilterArray['attachmentChangesSaved'] = apply_filters('wppb_edit_profile_attachment_changes_saved', $editProfileFilterArray['attachmentChangesSaved']);
 
 
 
 
569
  unset($_GET['fileType']);
570
  unset($_GET['fileName']);
571
  }
572
  }
573
 
574
  /* all the other messages/errors */
575
+ $nrOfBadUploads = 0;
576
+ $nrOfBadUploads = count($uploadName);
577
+ $nrOfBadExtUploads = count($uploadExt);
578
  if (($changesSaved == 'yes') && ($changesSavedNoMatchingPass == 'no') && ($changesSavedNoPass == 'no') && ($changesSavedNoEmail == 'no') && ($changesSavedNoEmailExist == 'no') && ($avatarUpload == 'yes') && ($nrOfBadUploads == 0) && ($nrOfBadExtUploads == 0)){
579
  $editProfileFilterArray['allChangesSaved'] = '
580
  <p class="changes-saved">'. __('The changes have been successfully saved.', 'profilebuilder') .'</p><!-- .changes-saved -->';
581
+ echo $editProfileFilterArray['allChangesSaved'] = apply_filters('wppb_edit_profile_all_changes_saved', $editProfileFilterArray['allChangesSaved']);
582
+
583
+ }elseif (($changesSaved == 'yes') && ($changesSavedNoEmailExist == 'yes') && ($previousError == 'no')){
 
584
  $editProfileFilterArray['allChangesSavedExceptExistingEmail'] = '
585
  <p class="semi-saved"> '.
586
  __('The email address you entered is already registered to a different user.', 'profilebuilder') .'<br/>'. __('The email address was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
587
  </p>';
588
+ echo $editProfileFilterArray['allChangesSavedExceptExistingEmail'] = apply_filters('wppb_edit_profile_all_changes_saved_except_existing_email', $editProfileFilterArray['allChangesSavedExceptExistingEmail']);
 
589
  $previousError = 'yes';
590
+
591
+ }elseif (($changesSaved == 'yes') && ($changesSavedNoEmail == 'yes') && ($previousError == 'no')){
 
592
  $editProfileFilterArray['allChangesSavedExceptInvalidEmail'] = '
593
  <p class="semi-saved"> '.
594
  __('The email address you entered is invalid.', 'profilebuilder') .'<br/>'. __('The email address was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
595
  </p>';
596
+ echo $editProfileFilterArray['allChangesSavedExceptInvalidEmail'] = apply_filters('wppb_edit_profile_all_changes_saved_except_invalid_email', $editProfileFilterArray['allChangesSavedExceptInvalidEmail']);
 
597
  $previousError = 'yes';
598
+
599
+ }elseif (($changesSaved == 'yes') && ($changesSavedNoMatchingPass == 'yes') && ($previousError == 'no')){
600
  $editProfileFilterArray['allChangesSavedMismatchedPass'] = '
601
  <p class="semi-saved">'.
602
  __('The passwords you entered do not match.', 'profilebuilder') .'<br/>'. __('The password was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
603
  </p>';
604
+ echo $editProfileFilterArray['allChangesSavedMismatchedPass'] = apply_filters('wppb_edit_profile_all_changes_saved_except_mismatch_password', $editProfileFilterArray['allChangesSavedMismatchedPass']);
 
605
  $previousError = 'yes';
606
+
607
+ }elseif (($changesSaved == 'yes') && ($changesSavedNoPass == 'yes') && ($previousError == 'no')){
608
  $editProfileFilterArray['allChangesSavedUncompletedPass'] = '
609
  <p class="semi-saved">'.
610
  __('You didn\'t complete both password fields.', 'profilebuilder') .'<br/>'. __('The password was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
611
  </p>';
612
+ echo $editProfileFilterArray['allChangesSavedUncompletedPass'] = apply_filters('wppb_edit_profile_all_changes_saved_except_uncompleted_password', $editProfileFilterArray['allChangesSavedUncompletedPass']);
 
613
  $previousError = 'yes';
614
+
615
+ }elseif ($allRequiredCompleted == 'no'){
616
  $editProfileFilterArray['errorSavingChanges'] = '<p class="error">'.$errorMessage.'<br/>'. __('Your profile was NOT updated!', 'profilebuilder').'</p><!-- .error -->';
617
+ echo $editProfileFilterArray['errorSavingChanges'] = apply_filters('wppb_edit_profile_error_saving_changes', $editProfileFilterArray['errorSavingChanges']);
 
618
  }
619
+
620
+ $wppb_premium = WPPB_PLUGIN_DIR . '/premium/functions/';
621
+ if (file_exists ( $wppb_premium.'extra.fields.php' )){
622
+ if (($changesSaved == 'yes') && ($nrOfBadUploads > 0) && ($previousError == 'no')){
623
+ $lastOne = 0;
624
+ $editProfileFilterArray['errorUploadingAttachments'] = '
625
+ <p class="semi-saved">'. __('There was an error while trying to upload the following attachments:', 'profilebuilder') .'<br/>
626
+ <span class="error">';
627
+ foreach ($uploadName as $key => $name){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
628
  $lastOne++;
629
+ $editProfileFilterArray['errorUploadingAttachments'] .= $name;
630
+ if ($nrOfBadUploads-$lastOne > 0)
631
+ $editProfileFilterArray['errorUploadingAttachments'] .= ';<span style="padding-left:10px"></span>';
632
  }
633
+ $editProfileFilterArray['errorUploadingAttachments'] .= '</span><br/>' . sprintf(__( 'Possible cause: the size was bigger than %1$sb. The listed attachements were %2$sNOT%3$s updated along with the rest of the information.', 'profilebuilder'), WPPB_SERVER_MAX_UPLOAD_SIZE_MEGA, '<span class="error">', '</span>') . '</p>';
634
+ echo $editProfileFilterArray['errorUploadingAttachments'] = apply_filters('wppb_edit_profile_error_uploading_attachments', $editProfileFilterArray['errorUploadingAttachments']);
635
+ $previousError = 'yes';
636
+
637
+ }if (($changesSaved == 'yes') && ($avatarUpload == 'no') && ($previousError == 'no')){
638
+ $editProfileFilterArray['errorUploadingAvatar'] = '
639
+ <p class="semi-saved">'.
640
+ __('There was an error while trying to upload your avatar picture.', 'profilebuilder') .'<br/>'. __('Possible cause: size/incorrect file-type.', 'profilebuilder') .'<br/>'. __('The avatar was', 'profilebuilder') .' <span class="error">'. __('NOT', 'profilebuilder') .'</span> '. __('updated along with the rest of the information.', 'profilebuilder') .'
641
+ </p>';
642
+ echo $editProfileFilterArray['errorUploadingAvatar'] = apply_filters('wppb_edit_profile_error_uploading_avatar', $editProfileFilterArray['errorUploadingAvatar']);
643
+ $previousError = 'yes';
644
+
645
+ }elseif (($changesSaved == 'yes') && ($nrOfBadExtUploads != 0) && ($previousError == 'no')){
646
+ $editProfileFilterArray['errorUploadingAttachmentExts'] = '
647
+ <p class="semi-saved">'.
648
+ __('There was an error while trying to upload the following attachment(s)', 'profilebuilder') .': <span class="error">';
649
+ foreach ($uploadExt as $key5 => $name5){
650
+ $lastOne++;
651
+ $editProfileFilterArray['errorUploadingAttachmentExts'] .= $name5;
652
+ if ($nrOfBadExtUploads-$lastOne > 0)
653
+ $editProfileFilterArray['errorUploadingAttachmentExts'] .= ';<span style="padding-left:10px"></span>';
654
+ }
655
+ $editProfileFilterArray['errorUploadingAttachmentExts'] .= '</span><br/>' . sprintf(__( 'Only files with the following extension(s) can be uploaded: %1$s<br/>This file was %2$sNOT%3$s updated along with the rest of the information.', 'profilebuilder'), '<span class="error">'.$allowedExtensions.'</span>', '<span class="error">', '</span>') . '</p>';
656
+ echo $editProfileFilterArray['errorUploadingAttachmentExts'] = apply_filters('wppb_edit_profile_error_uploading_attachment', $editProfileFilterArray['errorUploadingAttachmentExts']);
657
+ $previousError = 'yes';
658
  }
659
+ }
660
+
661
+ /* use this action hook to add extra content before the edit profile form. */
662
+ do_action( 'wppb_before_edit_profile_fields' );
663
+
664
  ?>
665
 
666
+ <form enctype="multipart/form-data" method="post" id="edituser" class="user-forms" action="<?php the_permalink(); ?>">
667
  <?php
668
+ echo '<input type="hidden" name="MAX_FILE_SIZE" value="'.WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE.'" /><!-- set the MAX_FILE_SIZE to the server\'s current max upload size in bytes -->';
669
+
670
+ $editProfileFilterArray2['contentName1'] = '<p class="nameHeader"><strong>'. __('Name', 'profilebuilder') .'</strong></p>';
671
+ $editProfileFilterArray2['contentName1'] = apply_filters('wppb_edit_profile_content_name1', $editProfileFilterArray2['contentName1']);
672
 
673
+ if ($wppb_defaultOptions['username'] == 'show'){
674
+ $editProfileFilterArray2['contentName2'] = '
675
+ <p class="username">
676
+ <label for="user_login">'. __('Username', 'profilebuilder') .'</label>
677
+ <input class="text-input" name="user_login" type="text" id="user_login" value="'. get_the_author_meta( 'user_login', $current_user->id ) .'" disabled="disabled"/> <span class="wppb-description-delimiter"> '. __('Usernames cannot be changed.', 'profilebuilder') .'</span>
678
+ </p><!-- .first_name -->';
679
+ $editProfileFilterArray2['contentName2'] = apply_filters('wppb_edit_profile_content_name2', $editProfileFilterArray2['contentName2'], $current_user->id);
680
+ }
 
 
 
681
 
682
+ if ($wppb_defaultOptions['firstname'] == 'show'){
683
+ $errorVar = '';
684
+ $errorMark = '';
685
+ if ($wppb_defaultOptions['firstnameRequired'] == 'yes'){
686
+ $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
687
+ if (isset($_POST['first_name'])){
688
+ if (trim($_POST['first_name']) == ''){
689
+ $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
690
+ $errorVar = ' errorHolder';
691
+ }
692
+ }
693
+ }
694
+ $editProfileFilterArray2['contentName3'] = '
695
+ <p class="first_name'.$errorVar.'">
696
+ <label for="first_name">'. __('First Name', 'profilebuilder') .$errorMark.'</label>
697
+ <input class="text-input" name="first_name" type="text" id="first_name" value="'. get_the_author_meta( 'first_name', $current_user->id ) .'" />
698
+ </p><!-- .first_name -->';
699
+ $editProfileFilterArray2['contentName3'] = apply_filters('wppb_edit_profile_content_name3', $editProfileFilterArray2['contentName3'], $current_user->id, $errorVar, $errorMark);
700
+ }
701
+
702
+ if ($wppb_defaultOptions['lastname'] == 'show'){
703
+ $errorVar = '';
704
+ $errorMark = '';
705
+ if ($wppb_defaultOptions['lastnameRequired'] == 'yes'){
706
+ $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
707
+ if (isset($_POST['last_name'])){
708
+ if (trim($_POST['last_name']) == ''){
709
+ $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
710
+ $errorVar = ' errorHolder';
711
+ }
712
+ }
713
+ }
714
+ $editProfileFilterArray2['contentName4'] = '
715
+ <p class="last_name'.$errorVar.'">
716
+ <label for="last_name">'. __('Last Name', 'profilebuilder') .$errorMark.'</label>
717
+ <input class="text-input" name="last_name" type="text" id="last_name" value="'. get_the_author_meta( 'last_name', $current_user->id ) .'" />
718
+ </p><!-- .last_name -->';
719
+ $editProfileFilterArray2['contentName4'] = apply_filters('wppb_edit_profile_content_name4', $editProfileFilterArray2['contentName4'], $current_user->id);
720
+ }
721
+
722
+ if ($wppb_defaultOptions['nickname'] == 'show'){
723
+ $errorVar = '';
724
+ $errorMark = '';
725
+ if ($wppb_defaultOptions['nicknameRequired'] == 'yes'){
726
+ $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
727
+ if (isset($_POST['nickname'])){
728
+ if (trim($_POST['nickname']) == ''){
729
+ $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
730
+ $errorVar = ' errorHolder';
731
+ }
732
+ }
733
+ }
734
+ $editProfileFilterArray2['contentName5'] = '
735
+ <p class="nickname'.$errorVar.'">
736
+ <label for="nickname">'. __('Nickname', 'profilebuilder') .$errorMark.'</label>
737
+ <input class="text-input" name="nickname" type="text" id="nickname" value="'. get_the_author_meta( 'nickname', $current_user->id ) .'" />
738
+ </p><!-- .nickname -->';
739
+ $editProfileFilterArray2['contentName5'] = apply_filters('wppb_edit_profile_content_name5', $editProfileFilterArray2['contentName5'], $current_user->id, $errorVar, $errorMark);
740
+ }
741
+
742
+ if ($wppb_defaultOptions['dispname'] == 'show'){
743
+ $errorVar = '';
744
+ $errorMark = '';
745
+ if ($wppb_defaultOptions['dispnameRequired'] == 'yes'){
746
+ $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
747
+ if (isset($_POST['display_name'])){
748
+ if (trim($_POST['display_name']) == ''){
749
+ $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
750
+ $errorVar = ' errorHolder';
751
+ }
752
+ }
753
+ }
754
+
755
+ $editProfileFilterArray2['displayName'] = '
756
+ <p class="display_name'.$errorVar.'">
757
+ <label for="display_name">'. __('Display name publicly as', 'profilebuilder') .$errorMark.'</label>
758
+ <select name="display_name" id="display_name">';
759
+ $public_display = array();
760
+ $public_display['display_username'] = get_the_author_meta('user_login', $current_user->id);
761
+ $thisFirstName = get_the_author_meta('first_name', $current_user->id);
762
+ if ( !empty($thisFirstName))
763
+ $public_display['display_firstname'] = get_the_author_meta('first_name', $current_user->id);
764
+ $thisLastName = get_the_author_meta('last_name', $current_user->id);
765
+ if ( !empty($thisLastName))
766
+ $public_display['display_lastname'] = get_the_author_meta('last_name', $current_user->id);
767
+ $public_display['display_nickname'] = get_the_author_meta('nickname', $current_user->id);
768
+ if ( !empty($thisFirstName) && !empty($thisLastName) ) {
769
+ $public_display['display_firstlast'] = $thisFirstName . ' ' . $thisLastName;
770
+ $public_display['display_lastfirst'] = $thisLastName . ' ' . $thisFirstName;
771
+ }
772
+ $thisDisplayName = get_the_author_meta('display_name', $current_user->id);
773
+ if ( !in_array( $thisDisplayName, $public_display ) ) // Only add this if it isn't duplicated elsewhere
774
+ $public_display = array( 'display_displayname' => $thisDisplayName ) + $public_display;
775
+ $public_display = array_map( 'trim', $public_display );
776
+ foreach ( $public_display as $id => $item ) {
777
+ $editProfileFilterArray2['displayName'] .= '<option id="'.$id.'" value="'.$item.'"';
778
+ if ($thisDisplayName == $item)
779
+ $editProfileFilterArray2['displayName'] .= ' selected';
780
+ $editProfileFilterArray2['displayName'] .= '>'.$item.'</option>';
781
+ }
782
+ $editProfileFilterArray2['displayName'] .= '
783
+ </select>
784
+ </p><!-- .display_name -->';
785
+
786
+ $editProfileFilterArray2['displayName'] = apply_filters('wppb_edit_profile_display_name', $editProfileFilterArray2['displayName'], $current_user->id, $errorVar, $errorMark);
787
+ }
788
+
789
+ $editProfileFilterArray2['contentInfo1'] = '<p class="contactInfoHeader"><strong>'. __('Contact Info', 'profilebuilder') .'</strong></p>';
790
+ $editProfileFilterArray2['contentInfo1'] = apply_filters('wppb_edit_profile_content_info1', $editProfileFilterArray2['contentInfo1']);
791
+
792
+ if ($wppb_defaultOptions['email'] == 'show'){
793
+ $errorVar = '';
794
+ $errorMark = '';
795
+ if ($wppb_defaultOptions['emailRequired'] == 'yes'){
796
+ $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
797
+ if (isset($_POST['email'])){
798
+ if (trim($_POST['email']) == ''){
799
+ $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
800
+ $errorVar = ' errorHolder';
801
+ }
802
+ }
803
+ }
804
+ $editProfileFilterArray2['contentInfo2'] = '
805
+ <p class="form-email'.$errorVar.'">
806
+ <label for="email">'. __('E-mail', 'profilebuilder') .$errorMark.'</label>
807
+ <input class="text-input" name="email" type="text" id="email" value="'. get_the_author_meta( 'user_email', $current_user->id ) .'" />
808
+ <span class="wppb-description-delimiter">'. __('(required)', 'profilebuilder') .'</span>
809
+ </p><!-- .form-email -->';
810
+ $editProfileFilterArray2['contentInfo2'] = apply_filters('wppb_edit_profile_content_info2', $editProfileFilterArray2['contentInfo2'], $current_user->id, $errorVar, $errorMark);
811
+ }
812
+
813
+ if ($wppb_defaultOptions['website'] == 'show'){
814
+ $errorVar = '';
815
+ $errorMark = '';
816
+ if ($wppb_defaultOptions['websiteRequired'] == 'yes'){
817
+ $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
818
+ if ((trim($_POST['website']) == '') && isset($_POST['website'])){
819
  $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
820
  $errorVar = ' errorHolder';
821
  }
822
+ }
823
+ $editProfileFilterArray2['contentInfo3'] = '
824
+ <p class="form-website'.$errorVar.'">
825
+ <label for="website">'. __('Website', 'profilebuilder') .$errorMark.'</label>
826
+ <input class="text-input" name="website" type="text" id="website" value="'. get_the_author_meta( 'user_url', $current_user->id ) .'" />
827
+ </p><!-- .form-website -->';
828
+ $editProfileFilterArray2['contentInfo3'] = apply_filters('wppb_edit_profile_content_info3', $editProfileFilterArray2['contentInfo3'], $current_user->id, $errorVar, $errorMark);
829
  }
830
+
831
+ if ($wppb_defaultOptions['aim'] == 'show'){
832
+ $errorVar = '';
833
+ $errorMark = '';
834
+ if ($wppb_defaultOptions['aimRequired'] == 'yes'){
835
+ $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
836
+ if ((trim($_POST['aim']) == '') && isset($_POST['aim'])){
 
 
 
 
 
 
 
 
837
  $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
838
  $errorVar = ' errorHolder';
839
  }
840
+ }
841
+ $editProfileFilterArray2['contentInfo4'] = '
842
+ <p class="form-aim'.$errorVar.'">
843
+ <label for="aim">'. __('AIM', 'profilebuilder') .'</label>
844
+ <input class="text-input" name="aim" type="text" id="aim" value="'. get_the_author_meta( 'aim', $current_user->id ) .'" />
845
+ </p><!-- .form-aim -->';
846
+ $editProfileFilterArray2['contentInfo4'] = apply_filters('wppb_edit_profile_content_info4', $editProfileFilterArray2['contentInfo4'], $current_user->id, $errorVar, $errorMark);
847
+ }
848
+
849
+ if ($wppb_defaultOptions['yahoo'] == 'show'){
850
+ $errorVar = '';
851
+ $errorMark = '';
852
+ if ($wppb_defaultOptions['yahooRequired'] == 'yes'){
853
+ $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
854
+ if ((trim($_POST['yim']) == '') && isset($_POST['yim'])){
 
 
855
  $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
856
  $errorVar = ' errorHolder';
857
  }
858
+ }
859
+ $editProfileFilterArray2['contentInfo5'] = '
860
+ <p class="form-yim'.$errorVar.'">
861
+ <label for="yim">'. __('Yahoo IM', 'profilebuilder') .$errorMark.'</label>
862
+ <input class="text-input" name="yim" type="text" id="yim" value="'. get_the_author_meta( 'yim', $current_user->id ) .'" />
863
+ </p><!-- .form-yim -->';
864
+ $editProfileFilterArray2['contentInfo5'] = apply_filters('wppb_edit_profile_content_info5', $editProfileFilterArray2['contentInfo5'], $current_user->id, $errorVar, $errorMark);
865
+ }
866
+
867
+ if ($wppb_defaultOptions['jabber'] == 'show'){
868
+ $errorVar = '';
869
+ $errorMark = '';
870
+ if ($wppb_defaultOptions['jabberRequired'] == 'yes'){
871
+ $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
872
+ if ((trim($_POST['jabber']) == '') && isset($_POST['jabber'])){
 
 
873
  $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
874
  $errorVar = ' errorHolder';
875
  }
876
+ }
877
+ $editProfileFilterArray2['contentInfo6'] = '
878
+ <p class="form-jabber'.$errorVar.'">
879
+ <label for="jabber">'. __('Jabber / Google Talk', 'profilebuilder') .$errorMark.'</label>
880
+ <input class="text-input" name="jabber" type="text" id="jabber" value="'. get_the_author_meta( 'jabber', $current_user->id ) .'" />
881
+ </p><!-- .form-jabber -->';
882
+ $editProfileFilterArray2['contentInfo6'] = apply_filters('wppb_edit_profile_content_info6', $editProfileFilterArray2['contentInfo6'], $current_user->id, $errorVar, $errorMark);
883
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
884
 
885
+ $editProfileFilterArray2['aboutYourself1'] = '<p class="aboutYourselfHeader"><strong>'. __('About Yourself', 'profilebuilder') .'</strong></p>';
886
+ $editProfileFilterArray2['aboutYourself1'] = apply_filters('wppb_edit_profile_content_about_yourself1', $editProfileFilterArray2['aboutYourself1']);
887
+
888
+ if ($wppb_defaultOptions['bio'] == 'show'){
889
+ $errorVar = '';
890
+ $errorMark = '';
891
+ if ($wppb_defaultOptions['bioRequired'] == 'yes'){
892
+ $errorMark = '<font color="red" title="'. __('This field is marked as required by the administrator.', 'profilebuilder') .'">*</font>';
893
+ if ((trim($_POST['description']) == '') && isset($_POST['description'])){
 
 
 
 
894
  $errorMark = '<img src="'.WPPB_PLUGIN_URL . '/assets/images/pencil_delete.png" title="'. __('This field wasn\'t updated because you entered and empty string (It was marked as required by the administrator.', 'profilebuilder') .'"/>';
895
  $errorVar = ' errorHolder';
896
  }
897
+ }
898
+ $editProfileFilterArray2['aboutYourself2'] = '
899
+ <p class="form-description'.$errorVar.'">
900
+ <label for="description">'. __('Biographical Info', 'profilebuilder') .$errorMark.'</label>
901
+ <textarea class="text-input" name="description" id="description" rows="5" cols="30">'. get_the_author_meta( 'description', $current_user->id ) .'</textarea>
902
+ </p><!-- .form-description -->';
903
+ $editProfileFilterArray2['aboutYourself2'] = apply_filters('wppb_edit_profile_content_about_yourself2', $editProfileFilterArray2['aboutYourself2'], $current_user->id, $errorVar, $errorMark);
904
+ }
905
+
906
+ if ($wppb_defaultOptions['password'] == 'show'){
907
 
908
+ $editProfileFilterArray2['aboutYourself3'] = '
909
+ <p class="form-password">
910
+ <label for="pass1">'. __('New Password', 'profilebuilder') .'</label>
911
+ <input class="text-input" name="pass1" type="password" id="pass1" />
912
+ </p><!-- .form-password -->
 
 
 
 
 
 
 
 
 
 
 
 
913
 
914
+ <p class="form-password'.$errorVar.'">
915
+ <label for="pass2">'. __('Repeat Password', 'profilebuilder') .$errorMark.'</label>
916
+ <input class="text-input" name="pass2" type="password" id="pass2" />
917
+ </p><!-- .form-password -->';
918
+ $editProfileFilterArray2['aboutYourself3'] = apply_filters('wppb_edit_profile_content_about_yourself3', $editProfileFilterArray2['aboutYourself3'], $errorVar, $errorMark);
919
+ }
920
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
921
 
922
+ $wppb_premium = WPPB_PLUGIN_DIR . '/premium/functions/';
923
+ if (file_exists ( $wppb_premium.'extra.fields.php' )){
924
+ require_once($wppb_premium.'extra.fields.php');
925
+
926
+ $page = 'edit_profile';
927
+ $returnedValue = wppb_extra_fields($current_user->id, $extraFieldsErrorHolder, $editProfileFilterArray2, $page, $error, $_POST);
928
+
929
+ //copy over extra fields to the rest of the fieldso on the edit profile
930
+ foreach($returnedValue as $key => $value)
931
+ $editProfileFilterArray2[$key] = $value;
932
+ }
933
 
934
+ /* additional filter, just in case it is needed */
935
+ $editProfileFilterArray2['extraEditProfileFilter'] = '';
936
+ $editProfileFilterArray2['extraEditProfileFilter'] = apply_filters('extraEditProfileFilter', $editProfileFilterArray2['extraEditProfileFilter']);
937
+ /* END additional filter, just in case it is needed */
938
 
 
 
939
 
940
+ $editProfileFilterArray2 = apply_filters('wppb_edit_profile', $editProfileFilterArray2);
941
+ foreach ($editProfileFilterArray2 as $key => $value)
942
+ echo $value;
 
 
 
 
 
 
 
 
 
 
 
943
  ?>
944
 
945
+ <p class="form-submit">
946
+ <input name="updateuser" type="submit" id="updateuser" class="submit button" value="<?php _e('Update', 'profilebuilder'); ?>" />
947
+ <?php// wp_nonce_field( 'update-user' ) ?>
948
+ <input name="action" type="hidden" id="action" value="update-user" />
949
+ </p><!-- .form-submit -->
950
+ <?php wp_nonce_field('verify_edit_user','edit_nonce_field'); ?>
951
+ </form><!-- #edituser -->
952
 
953
+ <?php
954
+ //use this action hook to add extra content after the edit profile form.
955
+ do_action( 'wppb_after_edit_profile_fields' );
956
+
957
+ }
958
+ ?>
959
 
960
  </div>
961
 
front-end/wppb.register.php CHANGED
@@ -1123,7 +1123,7 @@ function wppb_front_end_register($atts){
1123
  $multisite_message = true;
1124
 
1125
  $meta = array(
1126
- 'user_pass' => $userdata['user_pass'],
1127
  'first_name' => $userdata['first_name'],
1128
  'last_name' => $userdata['last_name'],
1129
  'nickname' => $userdata['nickname'],
1123
  $multisite_message = true;
1124
 
1125
  $meta = array(
1126
+ 'user_pass' => base64_encode($userdata['user_pass']),
1127
  'first_name' => $userdata['first_name'],
1128
  'last_name' => $userdata['last_name'],
1129
  'nickname' => $userdata['nickname'],
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Profile Builder
4
  Plugin URI: http://www.cozmoslabs.com/2011/04/12/wordpress-profile-builder-a-front-end-user-registration-login-and-edit-profile-plugin/
5
  Description: Login, registration and edit profile shortcodes for the front-end. Also you can chose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
- Version: 1.1.40
7
  Author: Reflection Media, Barina Gabriel
8
  Author URI: http://www.reflectionmedia.ro
9
  License: GPL2
@@ -54,7 +54,7 @@ function return_bytes($val) {
54
  }
55
 
56
 
57
- define( 'PROFILE_BUILDER_VERSION', '1.1.40' );
58
  define( 'WPPB_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
59
  define( 'WPPB_PLUGIN_URL', WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) );
60
  define( 'WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE', return_bytes( ini_get( 'upload_max_filesize') ) );
3
  Plugin Name: Profile Builder
4
  Plugin URI: http://www.cozmoslabs.com/2011/04/12/wordpress-profile-builder-a-front-end-user-registration-login-and-edit-profile-plugin/
5
  Description: Login, registration and edit profile shortcodes for the front-end. Also you can chose what fields should be displayed or add new (custom) ones both in the front-end and in the dashboard.
6
+ Version: 1.1.41
7
  Author: Reflection Media, Barina Gabriel
8
  Author URI: http://www.reflectionmedia.ro
9
  License: GPL2
54
  }
55
 
56
 
57
+ define( 'PROFILE_BUILDER_VERSION', '1.1.41' );
58
  define( 'WPPB_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
59
  define( 'WPPB_PLUGIN_URL', WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) );
60
  define( 'WPPB_SERVER_MAX_UPLOAD_SIZE_BYTE', return_bytes( ini_get( 'upload_max_filesize') ) );
readme.txt CHANGED
@@ -7,7 +7,7 @@ custom registration, custom registration form, custom registration page, extra u
7
  front-end register, front-end registration, frontend edit profile, edit profile
8
  Requires at least: 3.1
9
  Tested up to: 3.5
10
- Stable tag: 1.1.40
11
 
12
  Simple to use profile plugin allowing front-end login, registration and edit profile by using shortcodes.
13
 
@@ -93,6 +93,9 @@ This plugin only adds/removes fields in the front-end. The default information-f
93
  5. Logged in Page: screenshot7.jpg
94
 
95
  == Changelog ==
 
 
 
96
  = 1.1.40 =
97
  Minor changes to the readme file.
98
 
7
  front-end register, front-end registration, frontend edit profile, edit profile
8
  Requires at least: 3.1
9
  Tested up to: 3.5
10
+ Stable tag: 1.1.41
11
 
12
  Simple to use profile plugin allowing front-end login, registration and edit profile by using shortcodes.
13
 
93
  5. Logged in Page: screenshot7.jpg
94
 
95
  == Changelog ==
96
+ = 1.1.41 =
97
+ Email Confirmation bug on WPMU fixed.
98
+
99
  = 1.1.40 =
100
  Minor changes to the readme file.
101