Skip to content

Commit

Permalink
check for our $_POST value as well as it being different from current…
Browse files Browse the repository at this point in the history
… point value
  • Loading branch information
tw2113 committed Jul 4, 2014
1 parent 7b4c961 commit a4b7fa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function badgeos_save_user_profile_fields( $user_id = 0 ) {
update_user_meta( $user_id, '_badgeos_can_notify_user', $can_notify );

// Update our user's points total, but only if edited
if ( $_POST['user_points'] != badgeos_get_users_points( $user_id ) ) {
if ( isset( $_POST['user_points'] ) && $_POST['user_points'] != badgeos_get_users_points( $user_id ) ) {
badgeos_update_users_points( $user_id, absint( $_POST['user_points'] ), get_current_user_id() );
}

Expand Down

0 comments on commit a4b7fa9

Please sign in to comment.