Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notification and double email confirmation removal #685

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5623528
adds author archive template to theme, custom message
alex-418 May 16, 2019
df3408f
remove eypd menu item from forum
alex-418 May 16, 2019
7c1eaa1
target div to remove forum menu item
alex-418 May 16, 2019
abd4caf
Adds password confirmation field, validation, and error messaging (#670)
alex-418 May 17, 2019
34c345e
add location slug to custom export data
alex-418 May 21, 2019
5c27a6a
gets order of taxonomy from settings
alex-418 May 21, 2019
e49a30d
add transparent bc ministry png and webp
alex-418 May 21, 2019
cd2b783
reverts custom sort order for donut legend
alex-418 May 22, 2019
bccf00f
add city and province to custom export data
alex-418 May 22, 2019
e7f2bc5
exclude service system categories from donut data
alex-418 May 22, 2019
8174999
switch to stripos for case insensitive filering of service system cat…
alex-418 May 22, 2019
62e69d5
let the spaceship operator sort donut data by decesnding value
alex-418 May 23, 2019
fd7c678
spaceships and donuts don't mix, use array_multisort instead
alex-418 May 23, 2019
cb6c335
dump values of donut on cert
alex-418 May 23, 2019
3da5fb7
rm print_r on cert
alex-418 May 23, 2019
469cce3
rm sector conditional
alex-418 May 23, 2019
6fba0b3
array_multisort on value, descending
alex-418 May 23, 2019
bb447e4
cleanup print_r, set category name valye in service system conditional
alex-418 May 23, 2019
81c77cc
bbpress forum submit buttons, and heading text color
alex-418 May 23, 2019
5faafc6
remove cwp notify from event manager bp profile template
alex-418 Aug 13, 2019
fc7e9be
resolve build errors with non-existent unit tests
alex-418 Aug 14, 2019
b0d08d0
remove double e-mail confirmation
alex-418 Aug 15, 2019
2866c09
Merge branch 'master' into dev
alex-418 Aug 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ install:
before_script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} != "7.1" ]] && php -v | grep -q 'Xdebug'; then phpenv
config-rm xdebug.ini; fi
- bash bin/install-wp-tests.sh eypd_test root '' localhost $WP_VERSION
script:
- yarn run build:production
- vendor/bin/phpunit --configuration phpunit.xml
- vendor/bin/phpcs --standard=phpcs.ruleset.xml .
before_deploy:
- export TRAVIS_PROJECT_SLUG="$(basename $TRAVIS_BUILD_DIR)"
Expand Down
55 changes: 1 addition & 54 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -870,15 +870,6 @@ function eypd_custom_user_nav_item_screen() {
bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
}

/**
* display content on professional interests page
*/
function eypd_custom_screen_content() {

echo do_shortcode( '[cwp_notify_em_user_cat]' );

}

/*
|--------------------------------------------------------------------------
| Forms n' stuff
Expand Down Expand Up @@ -1919,48 +1910,4 @@ function eypd_no_sidebar_content_classes() {
echo ' column sixteen';
}

add_action( 'eypd_content_classes', 'eypd_no_sidebar_content_classes' );

/**
* Adds password confirmation field to registration page
*/
// @codingStandardsIgnoreStart

function eypd_email_confirm() {
?>
<?php do_action( 'bp_signup_email_first_errors' ); ?>
<input type="text" name="signup_email_first" id="signup_email_first" class="form_field" value="<?php
echo empty( $_POST['signup_email_first'] )?'':$_POST['signup_email_first']; ?>" />
<label>Confirm Email <?php _e( '(required)', 'buddypress' ); ?></label>
<?php do_action( 'bp_signup_email_second_errors' ); ?>
<?php }
add_action( 'bp_signup_email_errors', 'eypd_email_confirm',20 );

/**
* Validation and error messaging for email confirmation field on registration page
*/

function eypd_check_email_confirm() {
global $bp;
//buddypress for checks errors in signup_email, so we unset that error (if any) and instead check both the email fields
unset( $bp->signup->errors['signup_email'] );

//check if email address is correct and set an error message for the first field if any
$account_details = bp_core_validate_user_signup( $_POST['signup_username'], $_POST['signup_email_first'] );
if ( ! empty( $account_details['errors']->errors['user_email'] ) ) {
$bp->signup->errors['signup_email_first'] = $account_details['errors']->errors['user_email'][0];
}

//if first email field is not empty we check the second one
if ( ! empty( $_POST['signup_email_first'] ) ) {
//first field not empty and second field empty
if ( empty( $_POST['signup_email'] ) ) {
$bp->signup->errors['signup_email_second'] = 'Please make sure you enter your email twice';
} //both fields not empty but differ
elseif ( $_POST['signup_email'] !== $_POST['signup_email_first'] ) {
$bp->signup->errors['signup_email_second'] = 'The emails you entered do not match.';
}
}
}
add_action( 'bp_signup_validate', 'eypd_check_email_confirm' );
// @codingStandardsIgnoreEnd
add_action( 'eypd_content_classes', 'eypd_no_sidebar_content_classes' );
19 changes: 0 additions & 19 deletions plugins/events-manager/buddypress/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
*/
echo '<h2 class="top-padding">Training</h2>';
echo '<p>Adding an event to myEYPD does not confirm your registration, nor does deleting an event cancel your registration. To officially register for a professional development event you must contact the agency responsible for the training event.</p>';
echo do_shortcode( '[cwp_notify]' );

$past_ids = [];
$future_ids = [];
Expand Down Expand Up @@ -416,24 +415,6 @@ class='widefat post fixed'>
</div>
<?php } // end past events


/*
|--------------------------------------------------------------------------
| Professional Interests
|--------------------------------------------------------------------------
|
|
|
|
*/
echo '<h2 class="top-padding">Professional Interests</h2><h5>I\'m interested in learning about:</h5>';
echo '<div class="professional-interests">';
echo do_shortcode( '[cwp_notify_em_cat]' );
$user_id = get_current_user_id();
$member_link = bp_core_get_userlink( $user_id, '', true );
echo '</div>';
echo "<a href='{$member_link}professional-interests'><input class='right button c-button' type='button' value='Recommend Events'/></a>";

/*
|--------------------------------------------------------------------------
| Suggestions
Expand Down